Forum Replies Created by Priyanka M S

Viewing 15 posts - 346 through 360 (of 393 total)
  • in reply to: The ‘0’ on X-axis doesn’t start from the origin #21117

    Nirmalya,

    Axis-X does not start from 0 (zero) because of the auto-calculated axis minimum. However, it is possible to begin Axis-X from 0 by setting axis minimum to 0 and resetting it by setting it to null while updating the chart. Please take a look at the code snippet below for the same.

    var chart = new CanvasJS.Chart("chartContainer",{
      title :{
        text: "Live Data"
      },
      exportEnabled: true,
      axisX: {
        title: "Axis X Title",
        minimum: 0
      },
      axisY: {
        title: "Units"
      },
      data: [{
        type: "line",
        dataPoints : dps
      }]
    });
    
    chart.render();
    var xVal = dps.length + 1;
    var yVal = 15;
    var updateInterval = 10000;
    var updateChart = function () {
      chart.options.axisX.minimum = null;
      yVal = yVal + Math.round(5 + Math.random() *(-5-5));
      dps.push({x: xVal,y: yVal});
    
      xVal++;
      if (dps.length > 10 )
      {
        dps.shift();
      }
    
      chart.render();
    };
    
    setInterval(function(){updateChart()}, updateInterval);

    Also, have a look at this JSFiddle for complete working code.

    Chart in which axisX begins at 0

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Sync tooltips across charts #21092

    Aarti,

    We are looking into it and will get back to you at the earliest.


    Priyanka M S
    Team CanvasJS

    @ymadhumanchi,

    We are looking into it and will get back to you at the earliest.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: stackedBar100 not drawing all the way to 100 #21078

    @mpicazo,

    We have just released v2.1.3 with this bug fix. Please refer to the release blog for more information. Do download the latest version from our download page and let us know your feedback.


    Priyanka M S
    Team CanvasJS

    in reply to: Canvasjs chart waterfall #21077

    @kuhuycoi,

    We have just released v2.1.3 with this bug fix. Please refer to the release blog for more information. Do download the latest version from our download page and let us know your feedback.


    Priyanka M S
    Team CanvasJS

    in reply to: select range on a line by dragging mouse #21060

    @aksangwan,

    It is possible to calculate the range between the two selected dataPoints (select by clicking on dataPoints) with the help of click event.
    Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Sync tooltips across charts #21058

    Aarti,

    Please take a look at this updated jsfiddle.

    If this doesn’t work at your end, can you kindly provide the following details, so that we can try reproducing the issue you are facing and help you with a solution.
    1. CanvasJS version
    2. Browser details like browser name and version
    3. OS details like build and version
    4. Console errors if any

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Need a Gauge Chart #21053

    Kim,

    Guage chart is in our roadmap, but no definite timeline yet.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Sync tooltips across charts #21049

    Aarti,

    We are looking into it and will get back to you at the earliest.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: how to real time set marker when condition meet? #21046

    @martin,

    It is possible to make the marker visible only when condition is met. For which, you need to set markerSize to zero at dataSeries level and set the markerSize to a desired value for the dataPoint that satisfies the condition. Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: how to real time set marker when condition meet? #21030

    @martin,

    Can you kindly share a pictorial representation or jsfiddle depicting your requirement, so that we can understand your requirement better and help you out?

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Want to build chart in cron job functionality #21014

    @subhra,

    Please take a look at this article for info regarding executing JavaScript code (where you can create chart and render / export it as image) inside a cron job.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Plotting angle on line graph #21012

    @nousheen,

    This feature is not available as of now. However with couple of lines of code you can achieve the same. Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: Xaxis data #21011

    @akshay30498,

    You can use x-values along with labels to achieve this. You can group same labels by having same x-values to them. Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    in reply to: x axis labels not displaying from csv file #20996

    @faulduff,

    You can display the x axis labels from data retrieved from CSV file by pushing the dataPoints with labels along with y-values to chart. Please take a look at this jsfiddle.
    If this doesn’t solve your requirement, please share a jsfiddle, so that we can understand your requirement better and help you out.

    __
    Priyanka M S
    Team CanvasJS

Viewing 15 posts - 346 through 360 (of 393 total)