[Chartjs]-Vue-Chart.js: a chart doesn't begin from zero

2👍

I am wondering how this even works.

You return in your setData both, the chart data and the options.
Which will not work. The chart options should be a seperate object.

You have defined a options prop in your chart component, but you don’t pass any options to it.

You have to pass both, chartdata and the options to your chart component.
If you pass your chart options into the options prop of your chart component it should work.

Keep in mind that the reactiveMixin will either update the chart or completely re-render it with calling this.renderChart(chartdata, options)

So if you don’t pass any options it will re-render with default options.

Leave a comment