I read through some discussion on the Chart.js forum and they mention this problem occurring when there are multiple instances of the chart pointing to the same canvas. Chart.js used Canvas which … Verify signature files with my GnuPG public key.. License. For our project, we will choose Chart.js as it has fairly simple API and renders robust charts using Canvas HTML tag. I am using the Chart.js library to draw a bar graph, it is working fine, but now I want to destroy the bar graph and make a line graph in the same canvas.I have tried these two ways to clear the canvas: var grapharea = document.getElementById("barChart").getContext("2d"); grapharea.destroy(); var myNewChart = new Chart(grapharea, { type: 'radar', data: barData, options: barOptions }); Pingback: CanvasJS – jQuery Charts Plugin | Js Plugins. Chart.js used Canvas which is great in terms of performance and IE11+ also supports it. This tutorial has taken you through the steps on how to use this cool library. Photo by Marc-Olivier Jodoin on Unsplash. Chart.java is licensed under the Apache 2.0 license. Changkyun says: November 19, 2014 at 2:50 pm . To import it: Creating a Chart. The docs for Chart.js are a helpful source of info on what's possible and how to achieve it.. GnuPG public key. You can also modify the tooltips and the legend by changing their font size and color. I hope that callback function is called or event triggered with series name and y-axis value when user click on bar or line of chart. Download. You can read the discussion here: chartjs/Chart.js#920. To use it, we can include the Chart.js library via CDN. (React will take care of everything DOM related while Chart.js is responsible for drawing to a Canvas element.) If you aren’t familiar with Chart.js, it’s worth looking into it.It’s a powerful and simple way to create clean graphs with the HTML5