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 - fix broken tooltip examples for v5 #8592

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

dlabrecq
Copy link
Member

Need to fix two broken legend tooltip examples due to the Tooltip popper outputting a new div tag.

#8591

@dlabrecq dlabrecq changed the base branch from main to v5 January 25, 2023 16:15
@patternfly-build
Copy link
Contributor

patternfly-build commented Jan 25, 2023

@@ -297,7 +297,7 @@ This demonstrates how to embed HTML within a tooltip. Combining cursor and voron

```js
import React from 'react';
import { Chart, ChartArea, ChartAxis, ChartCursorFlyout, ChartCursorTooltip, ChartGroup, ChartPoint, ChartThemeColor } from '@patternfly/react-charts';
import { Chart, ChartArea, ChartAxis, ChartCursorFlyout, ChartCursorTooltip, ChartGroup, ChartPoint, ChartThemeColor, createContainer } 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.

I think createContainer is an unnecessary unused import

Copy link
Member Author

@dlabrecq dlabrecq Jan 27, 2023

Choose a reason for hiding this comment

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

It's used just below on line 315. I noticed it because CodeSandbox fails to load the example without it.

@nicolethoen
Copy link
Contributor

This will also likely need a code mod, right? To at least warn users that are using tooltips in charts that they need to wrap them in foreignObjects?

@dlabrecq
Copy link
Member Author

This particular example is more to show how to create a custom label component. However, I've created the codemod issue below.

See patternfly/pf-codemods#234

@nicolethoen nicolethoen merged commit a7d2e12 into patternfly:v5 Feb 10, 2023
@dlabrecq dlabrecq deleted the v5-8591-tooltip-examples branch February 15, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants