var chart = new CanvasJS("container",
Pingback: CanvasJS v1.5 with Stock Charts, Range Charts & Export as Image Feature
i love CanvasJs
Is there a method to set the name of the exported chart rather than the default “Chart.jpg” or “Chart.png”?
We’ve added a new property “exportFileName” at the top level of options using which you can set exported chart’s name. You can download the internal build from here. Do let us know if it worked as expected.
Fantastic! Thank you. …and in reply to your question the answer is yes and no. “Save As” functionality instead of “Save” would be a better solution. As is I’ll have to update exportFileName every time new data is received. Else the user will have to rename the saved file after each save. Either way, again thank you for your excellent work.
Is it possible to save image without clicking button by just calling the function
We don’t have this option built into the chart. But with couple of lines of code you can do the same by using jsPDF. Here is an example.
As of now Charts can only be saved with the default name. But surely we will implented this feature in V1.5 GA.
I want To Do Cursor Axis Point Show……How to Do in Canvasjs …….Its Possible To Do?
This feature is nice, but when using with .net and firefox it was causing a postback. I had to add the following (this._menuButton.setAttribute(“type”,”button”)) so that it would not default to type “submit”.
Thanks for reporting the issue, we will look into this.
This feature also doesn’t work in IE9. I get blob is undefined and according to the website blob is supported until IE10 https://developer.mozilla.org/en-US/docs/Web/API/Blob#Browser_compatibility
Is there a way to export the chart by executing a method instead of pressing the button?
It is not possible yet. But we will consider this in future versions.
Can I export multiple chart with one click ?
You can do so using toDataUrl. Please refer to following links:
BTW, do you want save them as individual files or in one file ?
Thank you very much.
Hi, is it possible to export the data of chart instead of image?
how could I automatically record the graphic in a jpg file
As as now we don’t have a method to export chart – will be implementing in future versions.
But you can do the same with few lines of code. Here is an example.
Is it possible that when chart created its also auto create image and save on server. So i can view that in future, rather every time call logic for create chart.
Is a chart exportable to excel (not as an image; but as excel chart object) ? This will be a great feature if its already available. Please alert me if its done or if there is any suggestive alternative to achieve this.
You can use libraries like excelbuilder or SheetJS to export as excel. But exporting charts as excel object is not supported but it can be inserted as image in excel file using those libraries.
Bootstrap makes that export button incredibly ugly. Any easy way to fix that? See http://www.abacharts.com for an example of the ugliness.
Is possible to attach the chart to send an mail?
You can export chart as image and attach it in mail, as scripting is not supported by email-clients.