Skip to content

feat(skills): adding complete data chart example#143

Merged
damyanpetev merged 4 commits intomasterfrom
charts-grids-skill
Apr 17, 2026
Merged

feat(skills): adding complete data chart example#143
damyanpetev merged 4 commits intomasterfrom
charts-grids-skill

Conversation

@kdinev
Copy link
Copy Markdown
Member

@kdinev kdinev commented Apr 16, 2026

Fixes IgniteUI/igniteui-cli#1608 for React

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a more complete IgrDataChart (React) reference example to the Ignite UI CLI skills documentation, addressing the need for clearer guidance on multi-module registration and bar chart setup.

Changes:

  • Extends the “Common Module Registrations” table to include IgrDataChart and point to a new complete example.
  • Adds a “Complete Data Chart Example” section covering required module registrations for bar charts, axis orientation, and a multi-series bar chart sample (with CSS and prop references).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/igniteui-react-components/reference/CHARTS-GRIDS.md Outdated
Comment on lines +188 to +197

return (
<div className={styles['chart-wrapper']}>
<h3 className={styles['legend-title']}>Highest Grossing Movie Franchises</h3>

{/* Legend must be rendered before the chart so the ref is populated */}
<IgrLegend ref={legendRef} orientation="Horizontal" />

<div className={styles['chart-container']}>
<IgrDataChart legend={legendRef.current ?? undefined}>
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The legend={legendRef.current ?? undefined} pattern won’t reliably wire up the legend: legendRef.current is null during render and refs don’t trigger a re-render when they’re populated, so the chart will likely keep legend as undefined. Use a callback ref / state setter to trigger a re-render, or set chartRef.current.legend in a useEffect after mount (and update the nearby comment that rendering order is sufficient).

Suggested change
return (
<div className={styles['chart-wrapper']}>
<h3 className={styles['legend-title']}>Highest Grossing Movie Franchises</h3>
{/* Legend must be rendered before the chart so the ref is populated */}
<IgrLegend ref={legendRef} orientation="Horizontal" />
<div className={styles['chart-container']}>
<IgrDataChart legend={legendRef.current ?? undefined}>
const chartRef = useRef<IgrDataChart>(null);
const attachLegend = (legend: IgrLegend | null) => {
legendRef.current = legend;
if (chartRef.current) {
chartRef.current.legend = legend ?? undefined;
}
};
const attachChart = (chart: IgrDataChart | null) => {
chartRef.current = chart;
if (chart) {
chart.legend = legendRef.current ?? undefined;
}
};
return (
<div className={styles['chart-wrapper']}>
<h3 className={styles['legend-title']}>Highest Grossing Movie Franchises</h3>
{/* Wire the legend to the chart after mount using callback refs */}
<IgrLegend ref={attachLegend} orientation="Horizontal" />
<div className={styles['chart-container']}>
<IgrDataChart ref={attachChart}>

Copilot uses AI. Check for mistakes.
{/* IgrNumericXAxis — value axis; start at 0 per bar chart best practices */}
<IgrNumericXAxis
name="xAxis"
title="Billions of U.S. Dollars"
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The comment says the value axis should "start at 0", but the example doesn’t set any axis minimum. Either set the appropriate axis minimum value property (so the axis actually starts at 0) or remove the claim to avoid misleading readers.

Suggested change
title="Billions of U.S. Dollars"
title="Billions of U.S. Dollars"
minimumValue={0}

Copilot uses AI. Check for mistakes.
@damyanpetev damyanpetev changed the title feat(*): adding complete data chart example feat(skills): adding complete data chart example Apr 17, 2026
@damyanpetev damyanpetev merged commit fafdad1 into master Apr 17, 2026
3 checks passed
@damyanpetev damyanpetev deleted the charts-grids-skill branch April 17, 2026 12:09
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.

React - Incorrect generation of CategoryChartType.Bar when using the MCP server

3 participants