Slide 60
Slide 60 text
• グラフの種類によってコンポーネント化
• データが異なる同じ種類のグラフに対応
• グラフの更新は、データをコンポーネントに渡すだけ
60
Vue.js導入後
//------------------
// 円グラフ
//------------------
Vue.component('pie-chart', {
extends: VueChartJs.Pie,
mixins: [VueChartJs.mixins.reactiveProp],
props: ['options'],
mounted: function () {
this.renderChart(this.chartData, this.options);
}
});