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

Changing Global Default Does Not Work #3

Open
xyrph opened this issue Nov 16, 2018 · 1 comment
Open

Changing Global Default Does Not Work #3

xyrph opened this issue Nov 16, 2018 · 1 comment
Assignees

Comments

@xyrph
Copy link

xyrph commented Nov 16, 2018

If I change Chart.defaults.global.plugins.colorschemes.scheme at any time, including before I define the first chart, the scheme color value is not used when I do create a chart.

For some reason, it always defaults to the value of ('brewer.Accent4'). That's odd. Where does that value come from?

The default value you have set in the plugin ('brewer.Paired12') is not used.

I can get a specific chart to draw with the scheme I want by setting ch.options.plugins.colorschemes.scheme

That works fine. But setting the global fails to fall through to a chart when I do not set the scheme on the chart directly. And again, the odd value of scheme that gets used for whatever reason is ('brewer.Accent4').

Note that I am only using scatter-type charts if that makes any difference.

It would be nice to be able to set the global and then have all charts pull from that, but right now the global setting is useless... and worse, wrong.

@nagix
Copy link
Owner

nagix commented Nov 18, 2018

Thank you for reporting the issue, but I cannot reproduce this issue. I set Chart.defaults.global.plugins.colorschemes.scheme to 'brewer.RdPu4' for example at the beginning, and it is applied to all the charts.

See https://jsfiddle.net/nagix/eLfznymd/. Note that this doesn't include the fix for #2, so the line colors are still set to gray.

@nagix nagix self-assigned this Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants