-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[charts][docs] Fix Population pyramid demo #17987
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
Conversation
Thanks for adding a type label to the PR! 👍 |
Deploy preview: https://deploy-preview-17987--material-ui-x.netlify.app/ Bundle size reportTotal Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) |
CodSpeed Performance ReportMerging #17987 will not alter performanceComparing Summary
|
26234b6
to
c34fc15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvements, thank you 💪
My two cents: |
That feels like the technical name, but I suspect users will search for "Population pyramid" instead. I didn't even know this was called "horizontal diverging bar chart", so I think users won't either. |
For the diverging bar chart, it feels like the pyramid charts is a too simple version of it. Looking at https://www.datylon.com/resources/chart-library/diverging-bar-chart, we might want something equivalent. Now, I'm surprised that I can't find a demo of this in https://echarts.apache.org/examples/en/index.html#chart-type-bar or https://www.highcharts.com/demo#highcharts-demo-column-and-bar-charts. In https://www.highcharts.com/demo/highcharts/bar-negative-stack, they give this a simpler name, so for #16587 we would likely need to invest into the search experience. |
Agree, Bar with negative values seems like a simpler name. Another example: https://apexcharts.com/javascript-chart-demos/bar-charts/bar-with-negative-values/ |
I did a few update:
I would prefer to keep the "Population pyramid" name since it's the official name of this chart. We already have something named positiveandnegativebarchart taken from this Rechart example We could add an extra demo similar to the diverging example you shared. If you agree we can add it in #17980 |
c8a90df
to
54dcc06
Compare
54dcc06
to
b756b3d
Compare
A continuation of #17652 and #17980. https://mui.com/x/react-charts/bar-demo/#population-pyramid has a number of problems:
Preview: https://deploy-preview-17987--material-ui-x.netlify.app/x/react-charts/bar-demo/#population-pyramid
Off-topics: I don't understand this:
mui-x/packages/x-charts/src/constants/index.ts
Lines 5 to 10 in ecc9177
I thought we would get 0 for all those values. I had to set
margin={{ right: 0, left: 0 }}
and then use CSS to set the margin that I wanted, with responsive values. Proposing this for the next major: #17988.