Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify UpdateModeEnum to not be const #736

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

SebastiaanSafeguard
Copy link
Contributor

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
@SebastiaanSafeguard
Copy link
Contributor Author

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",
...

@SebastiaanSafeguard
Copy link
Contributor Author

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

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@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
6 participants