Chartjs-How to export chart.js graph to svg in vue?

1👍

If png is acceptable for you, there might be a way to do it. Keep in mind that I haven’t tested this, but it should work by the looks of it.

Looking at the documentation of vue-chartjs, here it says that you can access the chartjs object with:

this.$data._chart

From there, you should be able to use its method for saving the chart as a png – toBase64Image():

this.$data._chart.toBase64Image()

Leave a comment