0đź‘Ť
If you want to create a chart js and integrate with view, you can create your canvas
on js outside of vue js flow, and then get the element reference inside vue and then integrate it, the big problem rendering components inside vue is that you need update your charts, it may cause unexpected behavior on canvas. Because tools like Vue are designed to refresh the html and canvas always are a single html tag with a lot of interactivity in js(not much html).
Vue-chart
You can install
vue-chart.js
It supports data updates and also you can access to the chart ref.
Updating charts: https://vue-chartjs.org/guide/#updating-charts
Acesing to ref: https://vue-chartjs.org/guide/#access-to-chart-instance
- Chartjs-Vue Chart.JS with Line component : Uncaught Error: class does not have id: [object Object]
- Chartjs-The Chart.JS Won't Show In The Browser
Source:stackexchange.com