Skip to content

Conversation

@Mash707
Copy link
Contributor

@Mash707 Mash707 commented Mar 6, 2025

Closes #11572

@patternfly-build
Copy link
Collaborator

patternfly-build commented Mar 6, 2025

@Mash707
Copy link
Contributor Author

Mash707 commented Mar 6, 2025

@thatblindgeye we have more examples in legends tab that need to be updated.
Interactive legend with pie chart, Legend tooltips, Legend links, Legend layout
Should I also update them in this PR?

@thatblindgeye
Copy link
Contributor

@rebeccaalpert wdyt re: the above comment? The issue only called out a specific example, but was the intent that other examples would also be updated?

@rebeccaalpert
Copy link
Member

I think ideally, I'd love to see all our examples in current syntax over time, but I'm personally a fan of small PRs. I think it might be better if we had separate issues for the others. The fact that it was in class syntax was a real hurdle for the guy I'm working with (new to React; didn't live through class syntax).

@thatblindgeye
Copy link
Contributor

For now let's keep this PR to updating the specified example from the linked issue. We can look into opening a followup down the line if it comes up again.

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for updating!

getInteractiveLegendEvents,
getInteractiveLegendItemStyles,
} from '@patternfly/react-charts/victory';
} from '@patternfly/react-charts';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the original import path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, we can keep it. I might have changed it accidentally.

@Mash707 Mash707 force-pushed the update-interactive-legend-example branch from f8dc1fb to 7335c3b Compare March 10, 2025 14:43
@Mash707 Mash707 requested a review from thatblindgeye March 10, 2025 16:46
@thatblindgeye thatblindgeye merged commit 8c84ff4 into patternfly:main Mar 10, 2025
13 checks passed
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

Thanks for your contribution! 🎉

@Mash707 Mash707 deleted the update-interactive-legend-example branch March 10, 2025 17:42
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.

Docs - Interactive Legend Example is in old React syntax

4 participants