[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.
[Update]
We have just released v1.8.5 Beta-1 which supports axis-reversal. 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.
[Update]
We have just released v1.8.5 Beta-1 which supports axis-reversal. 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.
Mitul,
You can set viewportMinimum to one month less than the last dataPoint. Here is an example.
Mitul,
You can use viewportMinimum and/or viewportMaximum to zoom to a specific region by default or to handle zooming programmatically.
Simon,
Check these links for your working code. Data from external CSV, Data saved as String.
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.
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
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.
—
Vishwas R
Team CanvasJS
You can use radius to make pie chart of fixed-size/radius irrespective of number of labels. Here is the updated jsfiddle.
As we checked your fiddle, you are using an older version of CanvasJS (v1.7.0). Kindly use the latest version of CanvasJS and stay updated with all the features and properties available.
Mats,
As of now, feature to set reserved width for the axisX label is not available. But you can set the maximum allowed width for labels using labelMaxWidth.
Sathya,
You can use valueFormatString to format date to show in 12Hours format. Check this example.