apertureless / vue-chartjs

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

[Bug]: Line data point can be of type string when using a timescale #1056

Open benny-noumena opened 1 year ago

benny-noumena commented 1 year ago

Would you like to work on a fix?

Current and expected behavior

When using a timescale then the data point for line/scatter can be of type String or Date.

However this is not accepted.

image

Reproduction

Pass in a iso time string

chart.js version

v4.4.0

vue-chartjs version

v5.2.0

Possible solution

Broaden the type to accept String and Date. Not sure if it is possible to accept this only if the scale is of type time.

Seungwoo321 commented 1 year ago

oh...same issue

dpash commented 3 months ago

It's also possible to use Luxon's DateTime objects if https://github.com/chartjs/chartjs-adapter-luxon is used.