score:0
Accepted answer
chart.js doesnt support conversion to pdf but you can convert it to image by using following code
function done() {
console.log('done');
var url=document.getelementbyid("page").todataurl();
document.getelementbyid("url").src=url;
}
in options you have to set the following :
onanimationcomplete: done
Source: stackoverflow.com
Related Query
- How to export a chart in Excel and PDF format using Chart.js
- How to plot chart from external JSON and format X-AXIS to show time using Chart.JS?
- How Export an Editable Chart with content to PPT and Excel
- How to save Chart JS charts as image without black background using blobs and filesaver?
- How to create a gantt chart using Chart.js and populate dates?
- How to draw outer labels for polar chart using ng2-charts and chart.js at fixed positions outside the rings?
- How to update a chart using VueJS and ChartJS
- how to increase space between legend and chart in chartjs (ng2charts ) using angular
- How do you set x and y axis and Title for a line chart using charts.js?
- Export chart and table both to pdf
- How to remove old chart and append new chart to div using chartjs
- How to plot a line chart which has both the start and points outside the canvas area using Chart.js
- How to show symbols after the label and before the numeric value using chart.js Bar chart in Angular
- How to export Chart.js chart using toBase64Image, but with no transparency?
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- how to draw Line chart using chart.js and datalabels should be shown
- How to show values on top of bars in a PDF using chart.js and chartjs-node-canvas?
- How to achieve a mixed chart of 'horizontal' bars and line chart using Chart.js?
- How to take data from an API and create a chart on that using Chart.js and Angular 8?
- How can I build some chart with Chart.js and ng2-charts using an array of revenus & budgets per month date as Data source?
- How to convert chart.js library chart to image in pure node.js without using HTML and CSS?
- How to run Chart.js samples using source code
- How to control width of chart using angular-chart and chart.js?
- How to export charts.js dynamic chart to PDF in Rails
- How to add vertical line in bar chart using chartJs and ng2-charts?
- how to create bar chart with group and sam color for each group using chart.js?
- How do I increase the space between the Legend and the Chart when using angular-chart.js?
- How to add text inside the doughnut chart using Chart.js?
- How to add an on click event to my Line chart using Chart.js
- How to Draw Gantt chart using chart js or other libraries
More Query from same tag
- Chart js data to start at zero
- Drawing line chart in chart.js placing dots only when value changes
- Accordion won't take up height of chart for first click
- I can not properly re scale <canvas> with width and height attributes
- Radar Chart, Chart.js v3.2 labels customization
- Control Scaling of Canvas When dragged out of chart limit
- ChartJs Memory Leak | Garbage Collection does not clean Chart Object or Arrays after render
- How to create a dynamic multi-line chart in chart.js
- Angular-chart.js - Make line chart does not curve
- Custom dataset object not setting chart.js bar chart colors in Angular 6
- How to show second set of labels to Chart.js doughtnut chart?
- How to change x-Axes label position in Chart.js
- How to use ChartJS object in a click event handler?
- Chart.js v2: How to make tooltips always appear on line chart?
- Chart.js: how to listen to hover/click events outside of plot area?
- How to add datetime formate for public function as key(stdClass) in controller/laravel
- chartjs & asp.net: Cannot read property 'labels' of undefined
- Showing labels on bubble chart in angular-charts
- How to disable canvas elements from hijacking mouse wheel when scrolling through a page?
- How to add vertical line in bar chart using chartJs and ng2-charts?
- Chartjs: Double x axis not having the same gridline
- How to populate multiple charts dynamically with Chart.js in Typescript
- Using chart.js inside node.js
- Chart js options not changing chart
- How to make aspecific API call from within a Line Chart class in ReactJS using react-chartjs-2?
- Looping through afterDraw in ChartJS
- Charts js only showing 2 data points on sparkline
- AJAX request not working unless alert() is used
- donut chart not rendering with csv data chart.js
- how to not repeat code while creating multiple charts in chart js