Forum Replies Created by Vishwas R

Viewing 15 posts - 1,531 through 1,545 (of 1,634 total)
  • in reply to: Data Click Browser Issue(IE) #11647

    muralimnmcse,

    Click event seems to be working fine across all browsers including Microsoft Edge.
    Data-Click Event

    Data-Click Event

    If you still find the issue, please create a jsfiddle and provide the browser version detail, so that we can look into the issue and resolve it.

    in reply to: Reduce animation initial delay #11625

    Anjali,

    We were unable to observe any delay in chart load. Can you please create a jsfiddle, so that we can look in to it and help you out?

    in reply to: Legends to Line Graph? #11588

    You need to set showInLegend: true to enable legends, which defaults to false. Here is the working jsfiddle.

    in reply to: place axis x up #11579

    [update]

    We have just released v1.9.5 Beta with Multiple Y axis & Secondary X axis support. Please refer to the release blog for more information.

    [Update]

    We have just released v1.8.5 Beta-1 which supports axis-reversal. Please refer to the release blog for more information.

    in reply to: Reverse Y axis #11578

    [Update]

    We have just released v1.8.5 Beta-1 which supports axis-reversal. Please refer to the release blog for more information.

    in reply to: reverse Y axis #11577

    [Update]

    We have just released v1.8.5 Beta-1 which supports axis-reversal. Please refer to the release blog for more information.

    in reply to: Invert Y axis #11576

    [Update]

    We have just released v1.8.5 Beta-1 which supports axis-reversal. Please refer to the release blog for more information.

    in reply to: Reverse YAxis in Line chart #11575

    [Update]

    We have just released v1.8.5 Beta-1 which supports axis-reversal. Please refer to the release blog for more information.

    in reply to: How to use viewport on dates #11532

    Mitul,

    You can set viewportMinimum to one month less than the last dataPoint. Here is an example.

    in reply to: How to use viewport on dates #11524

    Mitul,

    You can use viewportMinimum and/or viewportMaximum to zoom to a specific region by default or to handle zooming programmatically.

    in reply to: Data Store #11487

    Simon,
    Check these links for your working code. Data from external CSV, Data saved as String.

    in reply to: Data Store #11484

    Simon,

    You can use use jQuery.ajax() to get data from external csv file and pass it to chart. Check this jsfiddle.

    As of now, indexLabels are not shown for null dataPoints. As its hard to determine where to position indexLabel in line charts when dataPoint is null, we go with this behavior. As a work around, you can set y value to zero and show indexLabels.

    in reply to: Export Chart as Image/Get chart data as Base64 format #11468

    Sathya,

    You can change save.download = 'CanvasJS.png'; in first example to your desired name. Here CanvasJS.png is the image-file name. And in the second example, you can use exportFileName to set image-file name.

    Download location setting is a part of browser setting, it varies from browser-to-browser. You can change it under browser settings. Check these links to change/manage download location in chrome and Firefox.


    Vishwas R
    Team CanvasJS

    in reply to: Export Chart as Image/Get chart data as Base64 format #11465

    Sathya,

    You can auto-download chart as image with the help of toDataURL. toDataURL lets you get the base64 image data, which you can save as a file after chart is rendered. Below is the code-snippet for the same.

    $.when(chart.render()).then(function(){						
      var canvas = $("#chartContainer .canvasjs-chart-canvas").get(0);
      var dataURL = canvas.toDataURL('image/png');              
      //console.log(dataURL);
      //Save Image creating an element and clicking it
      var save = document.createElement('a');
      save.href = dataURL;
      save.download = 'CanvasJS.png';//Save as CanvasJS.png-File Name
      var event = document.createEvent("MouseEvents");
      event.initMouseEvent(
        "click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null
      );
      save.dispatchEvent(event);
    });

    Please take a look at this JSFiddle for an example on the same.

    Alternately, you can achieve same by setting exportEnabled to true and auto-clicking the link of format of image you like to save. Please find the code-snippet for this logic below.
    $('.canvasjs-chart-toolbar div>:nth-child(2)').click();
    Please take a look at this JSFiddle for complete code on this approach.

    CanvasJS Export as Image


    Vishwas R
    Team CanvasJS

Viewing 15 posts - 1,531 through 1,545 (of 1,634 total)