score:-1
you have to call save64img(mychart.tobase64image())
over an additional callback.
you can add this callback to the options
lineoptions = {
onanimationcomplete: function () {
save64img(mychart.tobase64image());
}
}
score:1
i know that it's been awhile since you have asked the question, but in the chart.js v2 you have to use oncomplete
method within the animation option.
animation: {
duration: 1500,
oncomplete: function (animation) {
this.tobase64image();
}
Source: stackoverflow.com
Related Query
- Blank PNG image using Chart JS . toBase64Image() function
- Converting Chart.js canvas chart to image using .toDataUrl() results in blank image
- How to save Chart JS charts as image without black background using blobs and filesaver?
- using react-chartjs-2 , How can I save my chart as png using a download button
- How to add image inside the doughnut chart using chart.js?
- 【React chart.js】How to add multiple data to Radar chart using map function
- Refreshing the image of a chart using chart.js
- 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
- Accessing data from the callback function of a bar chart using chart js
- How to constantly update y axis using a C# function to update a Live (Streaming) Chart.js Chart in ASP.NET core Web Application Razor Pages
- 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
- Using chart.js to output chart as a saved image rather than using canvas
- Is there a way to store a chart as an image directly to server using Chart.js?
- How to add text inside the doughnut chart using Chart.js?
- Moving vertical line when hovering over the chart using chart.js
- create a multi line chart using Chart.js
- How to add an on click event to my Line chart using Chart.js
- Display line chart with connected dots using chartJS
- Dynamically update the options of a chart in chartjs using Javascript
- How to Draw Gantt chart using chart js or other libraries
- Detecting hover events over parts of a chart using Chart.js
- Creating chart.js chart directly to PNG in Node js?
- using vue-chartjs in vue 3 : createElement is not a function
- Overlapping Bar Chart using Chart.js
- How to add text in centre of the doughnut chart using Chart.js?
- How to create stacked bar chart using react-chartjs-2?
- Display a limited number of labels only on X-Axis of Line Chart using Chart.js
- Chart.js - Add text/label to bubble chart elements without using tooltips?
- angular-chartjs line chart TypeError: t.merge is not a function
More Query from same tag
- How to Add X axis Padding in chart js Line Graph
- chart.js bar chart change color based on value
- charts.js not loading in Django
- Why isn't my X axes on my bar chart starting from zero?
- Get Dataset Values from Chart JS onHover in Version 3
- Grouped bar charts each group different level in chart.js
- multiple chartjs charts with the same configuration but different data
- How to pass dynamic values as objects inside data in line chart?
- Alternating bars in bar chart in chart.js are not labelled
- Charts.js Multi Line scales. See value curve
- Blazor ChartJs: Expanding bar to the end of the canvas
- ERROR TypeError: Cannot read properties of undefined (reading 'skip') Typescript/Api
- How to fill a graph by a color till a vertical line using chart.js
- Displaying every nth label on the x-axis
- 'Chart.js' time chart not displaying properly
- Representing multiple subsections within a section of a doughnut chart Chart.js
- chart.js Hide empty Chart and keep previous data if no data? .net MVC
- Chart.js don't show the first time
- Chart.js hidden property
- Make arbitrary line dashed
- ChartJS doesn't draw the chart
- ChartJS x axis title not visible when axis position is centered
- How to custom index label on each bar chart using chartjs?
- Passing Array to Chart.js not working, chart not rendering
- Show multiple line graphs on the same chart using chart JS
- Chart.js turn off all y axis and toggle them on / off
- Why is my chart not working? What am I missing
- Chart works uncorrectly chart.js
- ChartJs: x-axes min and max value not working
- Ember.Computed is not a function