vue-chartjs icon indicating copy to clipboard operation
vue-chartjs copied to clipboard

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

Open benny-noumena opened this issue 1 year ago • 2 comments

Would you like to work on a fix?

  • [ ] Check this if you would like to implement a PR, we are more than happy to help you go through the process.

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.

benny-noumena avatar Sep 15 '23 13:09 benny-noumena

oh...same issue

Seungwoo321 avatar Nov 01 '23 01:11 Seungwoo321

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

dpash avatar Aug 12 '24 07:08 dpash