43 lines
668 B
Vue
43 lines
668 B
Vue
<template>
|
|
<Line :data="data" :options="options" />
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
Chart as ChartJS,
|
|
CategoryScale,
|
|
LinearScale,
|
|
PointElement,
|
|
LineElement,
|
|
Title,
|
|
Tooltip,
|
|
Legend,
|
|
TimeScale,
|
|
} from 'chart.js';
|
|
import { Line } from 'vue-chartjs';
|
|
import * as chartConfig from './chartConfig.js';
|
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
|
import 'chartjs-adapter-moment';
|
|
ChartJS.register(
|
|
ChartDataLabels,
|
|
CategoryScale,
|
|
LinearScale,
|
|
PointElement,
|
|
LineElement,
|
|
Title,
|
|
Tooltip,
|
|
Legend,
|
|
TimeScale,
|
|
);
|
|
|
|
export default {
|
|
name: 'App',
|
|
components: {
|
|
Line,
|
|
},
|
|
data() {
|
|
return chartConfig;
|
|
},
|
|
};
|
|
</script>
|