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

add missing chart props #349

Merged
merged 7 commits into from
Oct 13, 2024

Conversation

AnnMarieW
Copy link
Sponsor Collaborator

@AnnMarieW AnnMarieW commented Oct 11, 2024

Closes #330

This PR simply adds missing props for the charts:

  • line charts

    • added lineProps - to pass props to recharts - necessary to enable animation
    • added withPointLabels to enable labeling all points
  • area charts

    • added lineProps - to pass props to recharts - necessary to enable animation
    • added withPointLabels to enable labeling all points
  • scatter

  • added pointsLabels to add labels to either x or y points

  • sparkline

    • added areaProps to pass props to recharts
  • RadarChart

    • added legentProps and radarProps - to pass props to recharts
  • Line, Area, Bar, Scatter:

- withRightYAxis rightYAxisProps rightYAxisLabel for enabling and formatting the right y axix

Docs are ready to go: snehilvj/dmc-docs#89

You can find a sample app of the chart animation based on a build from this PR on PyCafe

Copy link

github-actions bot commented Oct 11, 2024

This app demos how to enable animation when the data is updated. It uses the new lineProps to pass properties to recharts

Generated link: snehilvj/dash-mantine-components-349

@AnnMarieW AnnMarieW changed the title added missing line chart props add missing chart props Oct 11, 2024
@AnnMarieW AnnMarieW marked this pull request as ready for review October 12, 2024 14:34
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Curious, were these missed from the beginning, intentionally omitted, or were these props added to Mantine in an update and we didn't adapt right away? At some point it might be worthwhile writing a test that invokes TypeScript directly to compare props we make available to those the delegated component accepts. It would be a bit of an annoying test as you'd need to exclude a few Dash props and possibly ignore some Mantine props, but getting it working would ensure there isn't anything else we're missing, and then down the line it would be a big help to stay in sync.

@AnnMarieW
Copy link
Sponsor Collaborator Author

AnnMarieW commented Oct 13, 2024

Some were missing from the start (unintentionally) and some were added in some recent Mantine updates.
Having an automated process to check for missing props would be handy. But there are a lot of props we don't use in Dash because they require a function to be passed to them. But handling functions as props is on my wish list. 🙂

@AnnMarieW AnnMarieW merged commit b362f37 into snehilvj:master Oct 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animation property is not working in Line Chart
2 participants