Skip to content

Conversation

@keugenek
Copy link
Contributor

@keugenek keugenek commented Jan 9, 2026

Summary

AppKit charts are ECharts-based and do not accept Recharts children components. This was causing TypeScript build errors when LLMs generated code mixing AppKit chart components with Recharts primitives like <Bar>, <XAxis>, <CartesianGrid>, etc.

Problem

LLMs were generating code like:

<BarChart queryKey="data" parameters={{}}>
  <CartesianGrid strokeDasharray="3 3" />
  <XAxis dataKey="region" />
  <Bar dataKey="revenue" fill="#40d1f5" />
</BarChart>

This causes TypeScript errors because AppKit's BarChart doesn't accept children - it's a self-contained ECharts component.

Solution

Added explicit documentation to llms.txt:

  • Chart props reference showing correct usage (xKey, yKey, colors, stacked, etc.)
  • Critical anti-pattern warning about Recharts children not being supported
  • Updated LLM checklist with chart-specific guidance

Changes

  • Add chart props reference with correct usage examples
  • Add explicit anti-pattern warning about Recharts children
  • Update LLM checklist with chart-specific items

🤖 Generated with Claude Code

AppKit charts are ECharts-based and do not accept Recharts children
components. This was causing TypeScript errors when LLMs generated code
mixing AppKit chart components with Recharts primitives.

Changes:
- Add chart props reference showing correct usage (xKey, yKey, colors, etc.)
- Add explicit anti-pattern warning about Recharts children
- Update LLM checklist with chart-specific guidance

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@keugenek keugenek requested a review from ditadi January 9, 2026 12:15
@MarioCadenas MarioCadenas merged commit 3313209 into main Jan 9, 2026
4 checks passed
@MarioCadenas MarioCadenas deleted the fix/chart-documentation-for-llms branch January 9, 2026 14:51
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.

3 participants