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

Restore options namespace for controller options (options[type].* being too weak) #8073

Closed
simonbrunel opened this issue Nov 18, 2020 · 1 comment · Fixed by #8090
Closed

Comments

@simonbrunel
Copy link
Member

simonbrunel commented Nov 18, 2020

I was looking at the new options structure in v3 and I realize that we now have options[type].* with type the controller type (if I'm not wrong). But type could be anything such as flow, control, function, tree, interaction, events, etc.: we don't know because anyone can create a new chart type and use whatever name.

And that's a big issue because that means we can't guarantee no breaking change every time we add or rename a root options (e.g. core options). For example, if someone creates an external chart using type 'foo' and then we decide to introduce a new foo core option, then we break this external project for absolutely no good reason. It's also a shame to have to tell Chart.js users to not pick any name from our core options as a chart type.

That's for the same reasons we decided to scope the plugins options.

I would suggest to revert #6955 (and probably rename options.datasets[type] to options.controllers[type] to be consistent with Chart.defaults.controllers[type]).

@kurkle kurkle added this to the Version 3.0 milestone Nov 18, 2020
@kurkle
Copy link
Member

kurkle commented Nov 18, 2020

I went ahead and added the blocker status, because I agree we don't want to be stuck with potentially breaking external projects every time a new root option is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants