Optionalclass?: stringCSS class applied to the chart container <div>.
OptionalonDispose?: () => voidCalled before each dispose - including mid-session renderer reinits, not only on final component unmount.
OptionalonInit?: (instance: EChartsType) => voidCalled on the first instance creation only. Receives the fresh
EChartsType instance. For subsequent instance creations caused by a
renderer reinit, see SolidEChartProps for onReInit.
OptionalonReInit?: (instance: EChartsType) => voidCalled on every instance creation after the first, triggered by a
renderer prop change which causes a dispose -> reinit cycle.
Receives the fresh EChartsType instance.
OptionalonResize?: () => voidCalled after every successful chart.resize() triggered by the
ResizeObserver. Not called when resize is skipped by Guard 1
(unchanged dimensions on first observation) or Guard 2 (zero-sized
container).
Static: read once at init time.
Natural use case: read post-resize dimensions to sync external UI.
Optionaloption?: Accessor<EChartsOption>The full ECharts option object. Optional.
Reactive mode: pass an Accessor<EChartsOption> (signal or memo).
createChartEffect is wired automatically and calls setOption whenever
the accessor's value changes. Never pass a plain object, it would
snapshot at mount time and never update reactively.
Manual mode: omit option entirely. No reactive binding is wired.
Use ref or useChart to call setOption, appendData, or any
other instance method directly. Useful for streaming large datasets or
custom render loops where reactive overhead is undesirable.
Optionalref?: EchartsRefForwards the raw EChartsType instance. Accepts a plain callback or
a SolidJS signal setter (Setter<EChartsType | null>).
Receives null when the instance is disposed.
Optionalstyle?: JSX.CSSProperties | stringCSS styles applied to the chart container <div>.
All properties in SolidEChartMaybeProps accept both plain values
and reactive accessors (signals) via WithMaybeAccessor.
option must always be an Accessor<EChartsOption>, passing a plain
object is intentionally a compile-time error. A plain object would snapshot
at mount time and never update reactively.
Props that match SolidEChartConfig fields override the nearest SolidEChartProvider ancestor for this chart only.
Inline callback type inference
TypeScript's contextual typing does not flow callback parameter types through
mapped types (WithMaybeAccessor) or union types (MaybeAccessor). Inline
arrow functions passed to onInit, onDispose, ref, and onEvents handlers
may show implicit any errors for their parameters.
The recommended pattern is to extract handlers to explicitly typed variables.
const handleInit = (chart: EChartsType) => { ... };
const handleClick = (params: EventParams) => { ... };
<SolidEChart onInit={handleInit} onEvents={{ click: handleClick }} />
Alternatively, annotate inline.
Props for the SolidEChart component.