,
});
```
### Memoize Data
```typescript
const chartData = useMemo(() => transformData(rawData), [rawData]);
```
## Common Issues
### Chart Not Rendering
Ensure parent has explicit height:
```tsx
// ❌ Wrong
// ✅ Correct - parent with height
```
### SSR Errors
Use dynamic import with `ssr: false`:
```typescript
const Chart = dynamic(() => import("./chart"), { ssr: false });
```
## Best Practices
1. **ResponsiveContainer** - Always wrap charts
2. **CSS Variables** - Use `var(--chart-N)` for colors
3. **Lazy Load** - Dynamic import with `ssr: false`
4. **Memoize** - Use useMemo for data transformations
5. **Tooltips** - Provide formatted, detailed tooltips
6. **Mobile** - Test on small screens
## References
- Recharts: Use Context7 for latest docs
- Design Language System: See `design-language-system` skill for colors