-
Notifications
You must be signed in to change notification settings - Fork 1.2k
added pie chart #92
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
added pie chart #92
Conversation
|
This is some really good work! 👍 There's still a few challenges outstanding before it's ready for release though.
Labelling is a difficult problem for pie charts, especially that last problem of overlapping labels. I'd almost be tempted to take an approach similar to the donut chart of only showing the label for the currently selected segment. After all, a pie chart is just an aid to visualise some tabular data -- so if all of the data is important, you'd have the table alongside the pie chart on the same page... Hope that helps! Olly |
|
Cool, thanks. Will try to address these soon. |
|
mmm very interesting, may I suggest to add an option show zero values: true/false |
|
A side-comment regarding zero values: The 'safe' behaviour for the donut chart is to show zero values as very thin slices so they can be hovered and a zero value can be shown to the end user. If you're convinced that your charts shouldn't show zero values (I'm not), then I recommend you remove those values before passing them to the chart to render. |
|
I agree with @oesmith in his last post. I've faced issues with one application i've build once. The pie chart was about 99.99% one category and 0.01% another (I was using raphael.js back then). The result? The pie was all one slice and it was a fight to hover the super-tinny slice representing the minor category. I think that for values that are lower than ... maybe 2% the size of the slice should stay equal. The user will understand that the slice have "negligible" value and can represent almost nothing, but at same time he will still be able to hover it without problems. Just a tip. :) |
|
My 2 cents: |
|
Printing isn't a use case I've considered at all when building Morris.js. Does it work at all? I'm closing this PR, since it's gone stale. |
Added a simple implementation of a pie chart. Feedback welcome.