Skip to content

Modify UpdateModeEnum to not be const#736

Merged
kurkle merged 1 commit intomasterfrom
unknown repository
Mar 21, 2023
Merged

Modify UpdateModeEnum to not be const#736
kurkle merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Feb 27, 2023

Closes #735
Closes #721
Closes #731

This enum was changed to a normal enum instead of using const in chartjs/Chart.js#11095, so the type is no longer matching with Chart.js.

flogoe
flogoe previously approved these changes Feb 27, 2023
@ghost
Copy link
Author

ghost commented Feb 27, 2023

The change in Chart.js was technically breaking, since the Typescript types in any plugin could not have matched anymore. So bundled with the latest Chart.js version I wouldn't consider this a breaking change. With this change the code does however no longer work with any previous version of Chart.js except for those before the addition of the enum.

@elinake
Copy link

elinake commented Feb 28, 2023

What are the exact versions of Chart.js that should work before and after the change? I mean when importing both Chart.js and zoom plugin in a project

@flogoe
Copy link

flogoe commented Feb 28, 2023

I got it running with the following versions:

...
"chart.js": "4.1.1",
"chartjs-plugin-zoom": "^2.0.0",
...

@ghost
Copy link
Author

ghost commented Feb 28, 2023

I would say that based on https://github.com/chartjs/chartjs-plugin-zoom/pull/695/files#diff-093ad82a25aee498b11febf1cdcb6546e4d223ffcb49ed69cc275ac27ce0ccce

2.0.0 of this library introduced constfor chart.js 4.0.0. Then with 4.2.1const was removed in chart.js, so the changes in this PR should make the library compatible with >=4.2.1 and possibly with 3.x depending on the other changes.

@kurkle kurkle added the bug label Mar 1, 2023
@kurkle kurkle added this to the 2.0.1 milestone Mar 1, 2023
@kurkle
Copy link
Member

kurkle commented Mar 1, 2023

CI fails because of FF, fix is same as in Chart.js: https://github.com/chartjs/Chart.js/pull/11165/files
Feel free to create another PR for that fix

@ghost ghost requested a review from kurkle March 17, 2023 12:14
@luisrodriguesds
Copy link

Hey! Do you guys have any prediction of when this will be merged?

Thank you!

@kurkle kurkle merged commit 8e85d5a into chartjs:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants