Embed in a dashboard
Drop EliteChart into a fixed-size card without breaking the toolbar — sizing, scoping, and layout patterns.
EliteChart fills its parent — drop it into any fixed-size container and it boots. The trick is making sure the parent has a non-zero height and you've set sensible chrome defaults.
Quick example
How it works
The chart canvas measures the parent on mount and on every
ResizeObserver tick. If the parent is 0×0 (a common gotcha
inside flex / grid containers without an explicit row), nothing
paints. Set an explicit height — height: 480 or height: '100%'
inside a sized parent.
When embedding multiple charts on one page, each <EliteChart />
mounts an independent instance. They don't share state — every
instance has its own Zustand stores via localStorage keying.
Variations
Compact mode (hide bottom drawer)
Per-card persistence keys
Phase 1b lands a instanceId prop. Until then, two chart instances
on the same page share localStorage — usually fine, but acceptable
to disable persistence on one of them:
API
| Pattern | Notes |
|---|---|
| Fixed height | style={{ height: 480 }} |
| Flex parent | parent must have min-height |
| Aspect ratio | style={{ aspectRatio: '16 / 9' }} |