Skip to content

Conversation

noraleonte
Copy link
Contributor

@noraleonte noraleonte commented Apr 18, 2025

Copy link

github-actions bot commented Apr 18, 2025

Thanks for adding a type label to the PR! 👍

@noraleonte noraleonte added docs Improvements or additions to the documentation. scope: charts Changes related to the charts. design This is about UI or UX design, please involve a designer. labels Apr 18, 2025
@mui-bot
Copy link

mui-bot commented Apr 18, 2025

Deploy preview: https://deploy-preview-17447--material-ui-x.netlify.app/

Updated pages:

Bundle size report

Total Size Change: 0B(0.00%) - Total Gzip Change: 🔺+61B(0.00%)
Files: 122 total (0 added, 0 removed, 27 changed)

Show details for 100 more bundles (22 more not shown)

@mui/x-chartsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-proparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-charts-pro/BarChartProparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-charts-pro/ChartContainerProparsed: 0B(0.00%) gzip: 🔺+4B(+0.01%)
@mui/x-charts-pro/ChartDataProviderProparsed: 0B(0.00%) gzip: 🔺+3B(+0.01%)
@mui/x-charts-pro/ChartsToolbarProparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/ChartZoomSliderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/FunnelChartparsed: 0B(0.00%) gzip: 🔺+1B(0.00%)
@mui/x-charts-pro/Heatmapparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-charts-pro/LineChartProparsed: 0B(0.00%) gzip: 🔺+3B(0.00%)
@mui/x-charts-pro/PieChartProparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-charts-pro/RadarChartProparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/ScatterChartProparsed: 0B(0.00%) gzip: 🔺+1B(0.00%)
@mui/x-charts/BarChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartContainerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartDataProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsAxisHighlightparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsClipPathparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsGridparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsLabelparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsLegendparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsLocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsOverlayparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsReferenceLineparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsSurfaceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsTextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsTooltipparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsXAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsYAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/Gaugeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/LineChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/PieChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/RadarChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ScatterChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/SparkLineChartparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/Toolbarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-data-gridparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-data-grid-premiumparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-data-grid-premium/DataGridPremiumparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-data-grid-proparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-data-grid-pro/DataGridProparsed: 0B(0.00%) gzip: 🔺+3B(0.00%)
@mui/x-data-grid/DataGridparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickersparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-proparsed: 0B(0.00%) gzip: 🔺+4B(0.00%)
@mui/x-date-pickers-pro/AdapterDateFnsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterDateFnsJalaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterDayjsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterLuxonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentHijriparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentJalaaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangeCalendarparsed: 0B(0.00%) gzip: 🔺+2B(+0.01%)
@mui/x-date-pickers-pro/DateRangePickerparsed: 0B(0.00%) gzip: 🔺+4B(+0.01%)
@mui/x-date-pickers-pro/DateRangePickerDayparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangePickerDay2parsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateTimeRangePickerparsed: 0B(0.00%) gzip: 🔺+3B(0.00%)
@mui/x-date-pickers-pro/DesktopDateRangePickerparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-date-pickers-pro/DesktopDateTimeRangePickerparsed: 0B(0.00%) gzip: 🔺+3B(+0.01%)
@mui/x-date-pickers-pro/DesktopTimeRangePickerparsed: 0B(0.00%) gzip: 🔺+2B(0.00%)
@mui/x-date-pickers-pro/LocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MobileDateRangePickerparsed: 0B(0.00%) gzip: 🔺+3B(+0.01%)
@mui/x-date-pickers-pro/MobileDateTimeRangePickerparsed: 0B(0.00%) gzip: 🔺+3B(+0.01%)
@mui/x-date-pickers-pro/MobileTimeRangePickerparsed: 0B(0.00%) gzip: 🔺+1B(0.00%)
@mui/x-date-pickers-pro/MultiInputDateRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MultiInputDateTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MultiInputTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/PickersRangeCalendarHeaderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputDateRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputDateTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/StaticDateRangePickerparsed: 0B(0.00%) gzip: 🔺+2B(+0.01%)
@mui/x-date-pickers-pro/TimeRangePickerparsed: 0B(0.00%) gzip: 🔺+1B(0.00%)
@mui/x-date-pickers/AdapterDateFnsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDateFnsBaseparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDateFnsJalaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDayjsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterLuxonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentHijriparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentJalaaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateCalendarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateTimeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DayCalendarSkeletonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopDatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopDateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DigitalClockparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/LocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileDatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileDateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MonthCalendarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MultiSectionDigitalClockparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickerDay2parsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickersActionBarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickersCalendarHeaderparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against c47a51e

Copy link

codspeed-hq bot commented Apr 18, 2025

CodSpeed Performance Report

Merging #17447 will not alter performance

Comparing noraleonte:refine-charts-overview-page (c47a51e) with master (c4abca2)

Summary

✅ 9 untouched benchmarks

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label May 8, 2025
Copy link

github-actions bot commented May 8, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 9, 2025
@JCQuintas
Copy link
Member

Sorry, just noticed this, but shouldn't we align the left sections with the titles to the top?

Screenshot 2025-06-30 at 15 17 58 Screenshot 2025-06-30 at 15 18 22

@alexfauquette
Copy link
Member

I removed the code example since they bring less value than they create visual disturbance

@JCQuintas
Copy link
Member

@alexfauquette should we merge this? No idea why the perf decreased though 😆

@noraleonte
Copy link
Contributor Author

@alexfauquette I pushed some small styling adjustments and leaving some more generic feedback here:

  1. Did we intentionally remove the effect that highlights and saturates the hovered section in this grid?
    image
  2. I think all the labels in all the charts could be adjusted to a=have a fontWeight: 400. They feel a bit too bolded right now
    image
  3. What do you think about displaying the individual chart demos in a layout like this:
    image
    It would give each chart more space and it's more flexible if we want to add more demos later. I woul even split some chart components and showcase them separately: i.e 1 demo for funnel chart, 1 for pyramid. Same for line and area charts
    Maybe making the scatter chart first in this demo (or selected by default) might look nice. It's a pretty impressive demo
    image
  4. This is a nitpick, but we could try adjusting the colors used in this chart to match the pokemons
    image
    image
    #7DAB53 , #FF8D16 , #4CB0EE
  5. I am not 100% happy with this main chart but I also can't figure out what to improve. I might circle back to it in a follow-up 😓
    image

Comment on lines 13 to 20
// React.useEffect(() => {
// if (active) {
// return undefined;
// }
// const timeout = setTimeout(() => setSelected((p) => (p + 1) % 4), 5000);

return () => clearTimeout(timeout);
}, [selected, active]);
// return () => clearTimeout(timeout);
// }, [selected, active]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noraleonte was this comment only for debugging purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, just noticed it and fixed 😅 Sorry

@alexfauquette
Copy link
Member

Did we intentionally remove the effect that highlights and saturates the hovered section in this grid?

Yes, the main issue was the highlight demo that then get two hovers effect. A first one when entering the cell, and a second one when moving on items. Was not clear what is part of the library vs what is fancy UI

I think all the labels in all the charts could be adjusted to a=have a fontWeight: 400. They feel a bit too bolded right now

Ok, I will fix that :)

What do you think about displaying the individual chart demos in a layout like this:

I'm more inclined of having a selected number of feature that are visible out of the box. For en exhaustive showcase of the available charts, e will create a dedicated page like this one
https://echarts.apache.org/examples/en/index.html#chart-type-line

The issue with the other display is you need to click on small buttons to see the demo. I want us to identify the most important feature and show them.

For example, a company was concerned we do not support mixing libe, bars, and others. Now it should be obvious thanks to the "Advanced Features: Multi axes and series" demo. And new commer just need to scroll to see it.

Maybe making the scatter chart first in this demo (or selected by default) might look nice. It's a pretty impressive demo

Good point. I will do it

This is a nitpick, but we could try adjusting the colors used in this chart to match the pokemons

I thought one day I will find something more interesting to display 🙃 But yeah lets go full on pockemon starter pack 🚀

I am not 100% happy with this main chart but I also can't figure out what to improve. I might circle back to it in a follow-up 😓

I could subsample the data points to avoid those massive pick which correspond to monthly download (probably dependabot)

@prakhargupta1
Copy link
Member

For some devices (Surface Pro 7) the pie and radar charts look off. While these devices are rare, should we still fix it?

Screenshot 2025-07-02 at 11 44 08 AM

- Changed the Pie to a Donut with center label
- Made Charts list dense and added some margin to the component above
@bernardobelchior
Copy link
Member

The heatmap hover seems a bit weird because it's losing the border radius. Should we keep it when hovering?

Screen.Recording.2025-07-02.at.15.48.27.mov

I didn't realize these were clickable. Should we make it clearer? E.g., color change on hover, and maybe show the active state with a different color?

Screen.Recording.2025-07-02.at.15.49.16.mov

The space between the zoom buttons and the export button seems too big. We used to have a divider, but if we don't want it should we apply display: none to it so that the spacing is uniformo?

image

This section seems a bit weird to me:

image

The stacking section already has highlighting. Also, the toggle group makes me feel like highlighting is the opposite of stacking, which it isn't. Should we remove the toggle group altogether since the stacking section already has highlighting?


The border radius of the button should be 4px smaller than the toggle group because the padding is 4px.

Currently:

image

Button with 8px border-radius:

image

The scatter chart example (and the others in this section) are missing the translucent tooltip of the other examples:

image image

The pie chart example is actually a donut chart. While it's clear to us that a donut chart is a specific case of the more general pie chart, I'm not sure if it's so clear to other people. Not a big deal, just wanted to make sure we're aware that it might be confusing.

image

const currencyFormatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' })
.format;

function Export() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exporting isn't working well in dark mode:

Screen.Recording.2025-07-02.at.17.03.32.mov

This is kind of a bug.

In the docs example, the chart is exported with a white background. However, in the overview page the white background doesn't work well.

I can see the case for both options: sometimes users want the chart to be on a white background (e.g., if they're exporting it to send in an email), sometimes they might want the background to mimic the one on the page.

To solve this, I'm thinking that it might make sense to provide access to the print window before print so that users can customize what they want. For example, in this case, we'd just need to add data-mui-color-scheme="dark" to the html tag and CSS variables would recompute, causing the export to have a black background. However, this data-mui-color-scheme attribute is very specific to our use case, so providing a onBeforePrint: (iframe: HTMLIframeElement) might be useful.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onBeforeExport would probably be more useful. We can then do that for every export type.

The print's defaults should be data-mui-color-scheme="light" by default imo though, to always for light-mode unless overridden.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onBeforeExport would probably be more useful. We can then do that for every export type.

Good point 👍

The print's defaults should be data-mui-color-scheme="light" by default imo though, to always for light-mode unless overridden.

By default we don't add anything, so that will depend on the website's default styles. Users will be able to customize that with onBeforeExport.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that the print window should have a white background by default, so the light version of whatever is being printed should be used.

If we don't do it ourselves, then we should have a section in the docs telling devs that and how to change the behaviour.

Copy link
Member

@bernardobelchior bernardobelchior Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that the print window should have a white background by default, so the light version of whatever is being printed should be used.

The print window has the default, I haven't changed that.

I suppose that if the page of the chart you're printing has a rule @media print { html { background: black; } }, then it's expected that the print window will have a black background.

I agree we can have an option (like the Data Grid has) to skip copying the styles from the original window to the print window so that print rules like those aren't copied over (and for other use cases as well).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we can have an option (like the Data Grid has) to skip copying the styles from the original window to the print window so that print rules like those aren't copied over (and for other use cases as well).

Than can be an option as well.

I suppose that if the page of the chart you're printing has a rule @media print { html { background: black; } }, then it's expected that the print window will have a black background.

I hardly doubt someone would do that intentionally nowadays though. 😆 At least they would probably be very intentional when doing it, so they would look how to do it for charts as well

@alexfauquette alexfauquette merged commit ed1a951 into mui:master Jul 7, 2025
23 checks passed
@alexfauquette alexfauquette changed the title [charts] Refine overview page [docs] Refine charts overview page Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This is about UI or UX design, please involve a designer. docs Improvements or additions to the documentation. scope: charts Changes related to the charts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants