Transform v2 options to v3 #11196
JeremyBradshaw7
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Has anyone written some javascript or typescript to transform v2 options into the equivalent v3 options? In our case this was necessary as in some chart configurations we allow option overrides to be stored in a table, in json format, and we've recently upgraded the chartjs library from v2 to v3. I've come up with this typescript code (that uses lodash for deep cloning), but don't have full confidence that it includes everything, so would welcome some review or alternative code if anyone's already tackled this problem:
It won't deal with cases where
options
have been moved todatasets
, but should hopefully handle most changes withinoptions
.Beta Was this translation helpful? Give feedback.
All reactions