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

New colors plugin doesn't color pie charts #10849

Closed
stockiNail opened this issue Nov 3, 2022 · 5 comments · Fixed by #10851
Closed

New colors plugin doesn't color pie charts #10849

stockiNail opened this issue Nov 3, 2022 · 5 comments · Fixed by #10851

Comments

@stockiNail
Copy link
Contributor

Feature Proposal

In version 4 (I'm testing alpha 3), there is new colors plugin which should set a default colors for dataset. PR 10764.

There are checks in the plugin to understand the type of the chart but "pie" chart type (must be the same of "doughnut") is missing and the plugin is not coloring the pie chart correctly.

Codepen: https://codepen.io/stockinail/pen/yLEOZxo

Possible Implementation

I think an additional check should be added, as following:

    if (type === 'doughnut' || type === 'pie') {
      colorizer = createDoughnutDatasetColorizer();
    } else if (type === 'polarArea') {
      colorizer = createPolarAreaDatasetColorizer();
    } else {
      colorizer = createDefaultDatasetColorizer();
    }
@stockiNail
Copy link
Contributor Author

@LeeLenaleee apologize if I marked as enhancement, instead of bug. :( Thank you!

@LeeLenaleee
Copy link
Collaborator

np, can happen :) at least you still added a reproducable sample 😉

@stockiNail
Copy link
Contributor Author

Do you want the PR? I need some hours because now busy :(

@LeeLenaleee
Copy link
Collaborator

If you can do it, go for it, otherwise I will look if I have time for it tommorow evening

@stockiNail
Copy link
Contributor Author

If you can do it, go for it, otherwise I will look if I have time for it tommorow evening

submitted

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