如何导出图表。js excel图表吗?

时间:2022-12-04 09:34:58

I am using a chart.js 2 javascript chart in a web application and so far it has been great, but is there a way to export the data into an excel or pdf file ? thanks

我用的是图表。一个web应用程序中的js 2 javascript图表,到目前为止它还不错,但是有办法将数据导出到excel或pdf文件中吗?谢谢

2 个解决方案

#1


1  

I had similar task to do just a week ago. You could collect all data related to your chart and send this data as Json via Ajax to some controller. Then just draw it, similar post can be found here

就在一周前,我还有类似的任务要做。您可以收集与图表相关的所有数据,并通过Ajax将这些数据作为Json发送给某个控制器。然后画出来,类似的帖子可以在这里找到

#2


0  

Excel does not recognize the chart. I think the chart should be turned into an image. Then you need to export an image to excel. This page can help you : https://www.infragistics.com/community/forums/f/ignite-ui-for-javascript/109480/adding-image-in-excel

Excel不识别图表。我认为图表应该变成一张图片。然后您需要导出一个映像来excel。这一页可以帮助你:https://www.infragistics.com/community/forums/f/ignite- for javascript/109480/adding-imagexcel。

#1


1  

I had similar task to do just a week ago. You could collect all data related to your chart and send this data as Json via Ajax to some controller. Then just draw it, similar post can be found here

就在一周前,我还有类似的任务要做。您可以收集与图表相关的所有数据,并通过Ajax将这些数据作为Json发送给某个控制器。然后画出来,类似的帖子可以在这里找到

#2


0  

Excel does not recognize the chart. I think the chart should be turned into an image. Then you need to export an image to excel. This page can help you : https://www.infragistics.com/community/forums/f/ignite-ui-for-javascript/109480/adding-image-in-excel

Excel不识别图表。我认为图表应该变成一张图片。然后您需要导出一个映像来excel。这一页可以帮助你:https://www.infragistics.com/community/forums/f/ignite- for javascript/109480/adding-imagexcel。