apertureless / vue-chartjs

📊 Vue.js wrapper for Chart.js
https://vue-chartjs.org
MIT License
5.49k stars 831 forks source link

fix(types): bar chart data #1087

Closed Oleksii14 closed 2 months ago

Oleksii14 commented 2 months ago

Related issue

https://github.com/apertureless/vue-chartjs/issues/1058

Motivation of change

As you can see in the original issue, there is a problem with Bar chart typing (other charts maybe also have it). The Data type is not fully correct since Bar chart can accept other data types apart from the described ones in the typedCharts.d.ts.

Previously

image

Now

image

Notes about ExtendedDataPoint

There's a new type named ExtendedDataPoint which represents objects like { x: 1, y: 2 }, { id: 'Sales', nested: {value: 1500} and so on. Based on https://www.chartjs.org/docs/latest/general/data-structures.html

apertureless commented 2 months ago

Thanks! 🙏