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

[charts] Introduce hideLegend prop #15277

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Nov 5, 2024

Fix #15186

Will need to #15276 to highlight this props in the "Remove legend props" section for users who did only legend={{ hidden: true }}

Changelog

If you find slotProps={{ legend: { hidden: true } }} too long, you can now use hideLegend prop to prevent rendering the legend.

@alexfauquette alexfauquette added the component: charts This is the name of the generic UI component, not the React module! label Nov 5, 2024
@mui-bot
Copy link

mui-bot commented Nov 5, 2024

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

Generated by 🚫 dangerJS against dd0aa0b

Comment on lines 143 to 152
<PiePlot slots={slots} slotProps={slotProps} onItemClick={onItemClick} />
<ChartsOverlay loading={loading} slots={slots} slotProps={slotProps} />
{!hideLegend && (
<ChartsLegend
direction="column"
position={{ vertical: 'middle', horizontal: isRtl ? 'left' : 'right' }}
slots={slots}
slotProps={slotProps}
/>
)}
Copy link
Member

Choose a reason for hiding this comment

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

This is just adding to the file instead of changing a single line 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Oopsi, bad cherry pick resolution

Copy link

codspeed-hq bot commented Nov 5, 2024

CodSpeed Performance Report

Merging #15277 will not alter performance

Comparing alexfauquette:hideLegend (dd0aa0b) with master (36b13d8)

Summary

✅ 3 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts] Add hideLegend props
3 participants