/pf-react:pf-chart-genfrom pf-react
Generates PatternFly chart components with proper theming, responsive sizing, and accessibility. Useful when building data visualizations or dashboards with PatternFly.
Ships in pf-react. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate a complete PatternFly React chart component using PatternFly's Victory-based chart wrappers with proper theming and accessibility.
Use the PatternFly MCP server as the primary source for up-to-date component APIs and prop signatures.
The user provides one of:
First, confirm the project uses PatternFly. If the user explicitly requests a non-PatternFly framework (Material UI, Chakra, Ant Design, plain HTML) or the project has no @patternfly/react-core dependency, decline generation and explain this skill is PatternFly-specific.
Then determine the chart type:
ChartBar, ChartGroup; stacked bar → ChartBar, ChartStackChartLine, ChartAreaChartDonut, ChartPieChartBullet, ChartDonutUtilizationsparkline variant or mini donutDependencies:
npm install @patternfly/react-charts victory
CSS — required in the app entry point:
import "@patternfly/patternfly/patternfly-charts.css";
Import path — critical:
import { Chart, ChartBar, ChartAxis, ChartGroup, ChartVoronoiContainer }
from "@patternfly/react-charts/victory";
Always import from @patternfly/react-charts/victory — never from @patternfly/react-charts root. The bare root import is a PF5 pattern that breaks tree-shaking in PF6.
Basic bar chart example:
<Chart
ariaTitle="Monthly revenue"
ariaDesc="Bar chart showing revenue by month"
containerComponent={
<ChartVoronoiContainer
labels={({ datum }) => `${datum.x}: ${datum.y}`}
/>
}
domainPadding={{ x: [30, 25] }}
height={250}
width={600}
padding={{ bottom: 50, left: 50, right: 50, top: 20 }}
>
<ChartAxis />
<ChartAxis dependentAxis showGrid />
<ChartGroup>
<ChartBar data={chartData} />
</ChartGroup>
</Chart>
Imports:
from "@patternfly/react-charts/victory" — never the bare root@patternfly/patternfly/patternfly-charts.css in the app CSS setupTheming:
ChartThemeColor for standard color schemes: blue, cyan, gold, gray, green, multi, orange, purplethemeColor prop on the Chart wrapper to apply a schemeAccessibility:
Chart must have ariaTitle and ariaDesc props describing the dataChartVoronoiContainer as the containerComponent to provide interactive tooltips — this gives keyboard and screen reader users access to data valuesChartLegend with legendData and legendPosition so the segments are labeled without relying on color aloneResponsive sizing:
height and width on the Chart componentdiv and recalculate width on resizeComposition:
ChartGroup wraps multiple data series for grouped/clustered charts — set offset for grouped barsChartStack wraps multiple data series for stacked charts — do not use ChartGroup for stackingChartAxis for the independent axis, ChartAxis dependentAxis for the Y axisshowGrid on the dependent axis for readabilitydomainPadding on Chart to prevent bars from touching the axis edgesDonut/pie specifics:
ChartDonut is self-contained — it renders labels and a center label by defaultsubTitle and title props for the center content (e.g., "100 Total")constrainToVisibleArea on tooltip containers to prevent overflowEmpty state:
EmptyState or skeleton placeholder instead of an empty chartOutput the complete chart component ready to save. Include the import block, data transformation if needed, and the JSX chart structure with proper theming and accessibility.
eval/cases/bar-chart-themed/annotations.yaml (opens in a new tab)eval/cases/bar-chart-themed/input.yaml (opens in a new tab)eval/cases/donut-with-legend/annotations.yaml (opens in a new tab)eval/cases/donut-with-legend/input.yaml (opens in a new tab)eval/cases/negative-non-pf/annotations.yaml (opens in a new tab)eval/cases/negative-non-pf/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rh-uxd/ai-helpers --plugin pf-react16 skills in this plugin
/pf-chatbot-bundle-auditAudit PatternFly ChatBot imports for tree-shaking opportunities. Use when optimizing ChatBot bundle size or after upgrading @patternfly/chatbot.
/pf-component-checkAudit PatternFly React component nesting, wrapper hierarchies, and layout structure. Use when scanning for hierarchy violations or debugging spacing caused by missing wrapper components./pf-component-reuse-checkDetects custom React components in newly created or modified (uncommitted) code that overlap with PatternFly React components, suggests the PatternFly equivalent, and can replace the custom component then build to verify. Use when creating UI components, reviewing uncommitted React changes, or when the user asks to prefer PatternFly instead of a custom component.Other plugins' skills for the same job