chartjs / chartjs-adapter-luxon

Luxon adapter for Chart.js
MIT License
33 stars 24 forks source link

Upgrade to Chart.js 3.x #12

Closed benmccann closed 3 years ago

benmccann commented 4 years ago

We probably don't want to merge this yet, but I'm just sharing what will need to happen to make the tests work for 3.x

I'm not sure why I had to change t to x. Looking at the docs, it doesn't seem like I should have to do that.

Imperatorn commented 3 years ago

We probably don't want to merge this yet, but I'm just sharing what will need to happen to make the tests work for 3.x

I'm not sure why I had to change t to x. Looking at the docs, it doesn't seem like I should have to do that.

Hint from the Migration guide:

"TimeScale does not read t from object data by default anymore. The default property is x or y, depending on the orientation. See data structures for details on how to change the default."

woodhull commented 3 years ago

Does this mean the adapter does not currently work properly with chart.js 3?

kurkle commented 3 years ago

Does this mean the adapter does not currently work properly with chart.js 3?

No, only the tests are not working with v3 before this gets merged.

sakulstra commented 3 years ago

@kurkle No, only the tests are not working with v3 before this gets merged.

I just tried testing chart-js 3 beta, for me this fails within this chartjs-adapter-luxon package due to: 'chart.js' does not contain a default export (imported as 'Chart')

As I get it there's no default export any more, https://github.com/chartjs/chartjs-adapter-luxon/blob/master/src/index.js#L1 fails atm. Also _adapters seem to be no longer exposed :thinking:

Am I doing sth wrong or is this statement lo longer true with alpha-2 and beta? The first alpha seems to still work.

etimberg commented 3 years ago

Resolved in #29