Skip to content
Snippets Groups Projects
Commit 681de109 authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

improve chart.js import

parent 81a750a1
No related branches found
No related tags found
No related merge requests found
<template>
<div>
<canvas :id="id"></canvas>
<canvas :id="id" @click="test($event)"></canvas>
</div>
</template>
<script>
import { Chart, registerables } from 'chart.js'
import Chart from 'chart.js/auto'
export const chartTypes = [
'line',
......@@ -58,9 +58,6 @@ export default {
this.chart = new Chart(document.getElementById(this.id), this.chartData)
}
},
created() {
Chart.register(...registerables)
},
mounted() {
this.createChart()
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment