Forum Replies Created by Sanjoy

Viewing 15 posts - 91 through 105 (of 177 total)
  • in reply to: Pushing a datapoint in front #11459

    Hi,

    In this case you have to assign x value also or you need to increase auto assigned x value for each dataPoints. Please check this example.

    in reply to: Spline & tooltip question #11445

    Thijs,

    1) It’s the actual behavior of spline curve but we will reconsider it again.
    2) And setting toolTipContent to null will help you to disable toolTip for a particular dataSeries.

    in reply to: Call 2 arrays in the datapoints[ ] #11432

    Elina,

    To render the dataPoint with one array for x value and other array for y values, you need to parse the arrays according to data format accepted by CanvasJS. Check out the below code snippet for parsing the arrays.

    function parseDataPoints() {
      for (var i = dps.length; i < dateArray.length; i++)
        dps.push({
          x: new Date(dateArray[i]),
          y: numberArray[i]
        });
    };

    Please take a look at this JSFiddle for complete code sample.

    Chart with user input data and parsing from array

    —-
    Sanjoy Debnath
    Team CanvasJS

    We are using Bezier Curve for drawing Spline Curve. Am not able to find a way to know intersection point of spline and line. But you can look into the function renderSpline & getBezierPoints in our source code (canvasjs.js) for more information on the same.

    in reply to: progress bar on dataloading #11414

    Any kind of progress indicator is compatible with CanvasJS. Here is a blog to show progress indicator for an ajax request.

    in reply to: How can I use PHP MySQL Dynamic data #11412

    For displaying live data from database you need to create

    1. A PHP service (or any other server side technology) that returns data in JSON format to CanvasJS,
    2. HTML page that does AJAX request after certain interval to the server and fetches the data. After getting the data, it will render the updated chart.

    Here is a similar example to implement the same in client side.

    Also refer this thread.

    Are you looking for markerColor with Scatter Chart. And it is not possible to access internal functions of library.

    jproduction,

    Sorry we don’t have this feature. You need to find it out mathematically.

    in reply to: How to set the viewing a Full Screen #11391

    Here it is a generic case to set height of any HTML div 100%. By setting height to 100% chart will take immediate parent container’s height, in this case you have to specify height of the parent container. Still if you want to show the chart with 100% height of the window with responsiveness you can try by setting the attribute <div id="chartContainer" style="height: 100%; width: 100%; position: absolute"></div>.

    Please take a look at this JSFiddle for complete code.

    Chart with full screen width and height

    Please refer these threads for more information

    1. thread-1
    2. thread-2
    in reply to: is there a way to have two charts share 1 y-axis? #11385

    [update]

    We have just released v1.9.6 Beta with Methods & Properties, which allows you to programmatically access internally calculated values, export chart as image, print chart, etc. Please refer to the release blog for more information.

    Please check this jsfiddle.

    xiaosongzou,

    1) As of now we don’t have width property of label. Using margin you can align the axis of both the chart.
    2) For controlling gap between bars you can use dataPointMinWidth.

    Also you can check interval,viewportMinimum and viewportMaximum for aligning the labels/grid-lines.

    in reply to: Can I force show label ? #11376

    Sourav,

    Yes you can force to show required labels using labelFormatter. Here is an example.

    in reply to: Aligning Multiple Vertical Charts #11363

    [update]

    We have just released v1.9.6 Beta with Methods & Properties, which allows you to programmatically export chart as image, print chart, access internally calculated values, etc. Please refer to the release blog for more information.

    Please check this jsfiddle.

    You can do the same for axisY2. Here is updated fiddle with aligning axisY2.

    in reply to: Aligning Multiple Vertical Charts #11361

    Hi,

    As of now this feature is not available in our library. Here is an workaround to align the axis.

    in reply to: How can I use PHP MySQL Dynamic data #11353

    elvisximenes,

    Can you please post sample of your JSON data.
    And for showing 3 lines you have to pass JSON data in the CanvasJS data format with all the 3 dataSeries from server side. Similar as you have done for ‘submited’.

    • This reply was modified 8 years, 6 months ago by Sanjoy.
    in reply to: Multiple Graphs on Tabs #11337

    @mahi2000,

    The problem may be due to rendering the chart before even tab is displayed because of which dimensions for the chart are not calculated properly. You can use tab events to initialize and render the respective chart after the tab is displayed as shown in this code snippet.

    $('#bs-tab2').on("shown.bs.tab",function(){
      chartTab2();
      $('#bs-tab2').off();
    });

    Please take a look at this JSFiddle for complete code.

    Charts within BootStrap Tabs

    If the problem still persists, please create a JSFiddle. So that we can look into it.

    —-
    Sanjoy Debnath
    Team CanvasJS

Viewing 15 posts - 91 through 105 (of 177 total)