ECharts instance accessor from createChart or useChart.
Reactive accessor returning the full ECharts option object. Must be an accessor - passing a plain object snapshots at call time and never updates.
Optional merge strategy. See CreateChartEffectOptions.
Both instance and option are explicit tracked dependencies via on():
option changes: calls setOption with the new option on the
current instance. The normal reactive update path.instance changes: fires on both transitions of a reinit cycle:
chart -> null (early return, no call on a disposed instance) and
null -> newChart (applies the current option to the fresh instance).autoMerge mode
When autoMerge: true, explicit notMerge and replaceMerge options
are ignored. Instead, optionMergePlan analyses the structural diff
between the previous and new option and automatically picks the minimal
correct merge strategy, eliminating the need to manually reason about
notMerge and replaceMerge.
Note: on instance reinit the signature is reset so the first setOption
on the new instance always uses notMerge: false.
A fresh instance has no previous state to diff against.
When autoMerge: false (default), merge strategy params (notMerge,
replaceMerge, lazyUpdate, silent) are read with untrack, they
configure the call but are not tracked as dependencies. A change to merge
strategy alone does not trigger a redundant setOption call.
SSR-safe: no-ops on the server.
// Basic usage - explicit merge strategy (default)
createChartEffect(instance, option);
// With replaceMerge - targeted series replacement
createChartEffect(instance, option, { replaceMerge: ['series'] });
// With autoMerge - library infers the correct strategy automatically
createChartEffect(instance, option, { autoMerge: true });
echartsInstance.setOption [external]
Reactive
setOptionbridge - callschart.setOptionwheneverinstanceoroptionchanges.