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

Pie chart having groupped labels with values #21

Closed
ursedaniel opened this issue Aug 2, 2020 · 4 comments
Closed

Pie chart having groupped labels with values #21

ursedaniel opened this issue Aug 2, 2020 · 4 comments
Labels
question Further information is requested

Comments

@ursedaniel
Copy link

Hello, I want to have the pie chart values groupped, i see that I can do that with Labels, but for the values I can't have an array of values, do you guys know a way to achieve this?
As you can see in the photo only the first label has the corresponding value, but the 2nd one doesnt.
Thanx!
Screenshot 2020-08-02 at 16 10 11
Screenshot 2020-08-02 at 16 12 33

@93Alliance
Copy link
Owner

You can't use pie chart with your dataset. You could try bar chart.

[[300,15],500,100]

Because in pie chart, chart.js need to calculate the scale, [300, 15] can't be calculated with other values in the array.

@93Alliance
Copy link
Owner

You can try it.
https://stackblitz.com/edit/angular-ngchartjs-issues21

@93Alliance 93Alliance added the question Further information is requested label Aug 4, 2020
@ursedaniel
Copy link
Author

@93Alliance worked like a charm, thank you so much!

@ursedaniel
Copy link
Author

I'm facing a problem, when running with --prod flag I get this error in console after following your example @93Alliance :
Screenshot 2020-10-18 at 17 49 21
Screenshot 2020-10-18 at 17 49 39
Screenshot 2020-10-18 at 17 49 58
Any ideas how to fix it? without --prod flag it works pretty good but I need it to be prod valid, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants