Files
raven-client/ayanova/src/components/chart-line-control.vue
2020-06-02 14:08:31 +00:00

43 lines
701 B
Vue

<script>
import { Line } from "vue-chartjs";
/*
Bar,
HorizontalBar,
Doughnut,
Line,
Pie,
PolarArea,
Radar,
Bubble,
Scatter
*/
//https://vue-chartjs.org/guide/
//https://www.chartjs.org/docs/latest/
export default {
extends: Line,
props: {
chartData: {
type: Object,
default: null
},
options: {
type: Object,
default: null
}
},
watch: {
chartData() {
//these do nothing
//this.$data._chart.update();
//this.$data._chart.renderChart();
//this redraws the chart
this.renderChart(this.chartData, this.options);
}
},
mounted() {
this.renderChart(this.chartData, this.options);
}
};
</script>