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] Export data type in onAxisClick(_, data) callback #15038

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

clins1994
Copy link
Contributor

@clins1994 clins1994 commented Oct 20, 2024

Problem

In a scenario where we'd like to have a controlled state that holds the axis data and make other components react to that state as we update it by clicking on the axes of the chart it would be very useful if we could re-use the AxisData type. But it was not exported when I checked the source code.

Main Feature

This PR's purpose is to

  • export ChartsAxisData type making it possible to import it from the mui library

Follow-ups After Review

  • renamed from AxisData to ChartsAxisData as per @oliviertassinari 's suggestion
  • ran pnpm docs:api:build which added the type to docs

@mui-bot
Copy link

mui-bot commented Oct 20, 2024

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

Generated by 🚫 dangerJS against 36d1a00

@oliviertassinari oliviertassinari added the component: charts This is the name of the generic UI component, not the React module! label Oct 20, 2024
@oliviertassinari oliviertassinari changed the title chore(ChartsOnAxisClickHandler): export AxisData type [charts] Export data type in onAxisClick(_, data) callback Oct 20, 2024
Copy link

codspeed-hq bot commented Oct 20, 2024

CodSpeed Performance Report

Merging #15038 will not alter performance

Comparing clins1994:master (36d1a00) with master (c54b77c)

Summary

✅ 3 untouched benchmarks

@clins1994
Copy link
Contributor Author

@oliviertassinari locked and loaded ✅ pls 🙏

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution 👍

@alexfauquette alexfauquette merged commit 361602b into mui:master Oct 21, 2024
19 checks passed
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! typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants