Component API and TypeScript
- Added typed, read-only
chartandrootproperties.chartfollows chart re-initialization and becomes unavailable when the component is disposed;rootexposes the mounted<x-vue-echarts>element. - Exposed more current ECharts instance methods:
getZr,getId,isSSR,getDevicePixelRatio,makeActionFromEvent,updateLabelLayout,convertToLayout,getVisual,renderToCanvas,renderToSVGString, andgetSvgDataURL. - Made the component's public
dispose()terminal and idempotent. Subsequent proxied method calls report that the component has been disposed instead of operating on stale component state. - Exported
AutoResizeandLoadingOptionsfrom the package root. - Published the
#graphicslot in the root component type and made generated declarations compatible with the supported Vue 3.3 and ECharts 6.0 peer floors. - Expanded event payload types and added idiomatic camel-case prop aliases such as
onDataZoom,onBrushEnd, andonZr:mouseMove, while retaining lower-case forms. - Allowed reactive injected theme, init, update, and loading options to resolve to
nullorundefined; an explicit prop still takes precedence over its injected value.
Loading
- Added the
loading-typeprop for selecting registered ECharts loading effects and allowed effect-specific fields inloading-options. - Merged injected and local loading options reactively, including nested changes, and kept the overlay synchronized with chart and effect changes from initialization onward.
Events and callback slots
- Made chart and ZRender listeners reactive. Replaced or removed handlers take effect immediately, array dispatch remains stable during an event, and
.oncehandlers stay consumed until replaced. - Preserved case-sensitive
native:event names and Vue DOM modifiers, and expanded typed coverage for chart actions and ZRender pointer and drag events. - Let callback slots target indexed components and nested option structures, with validated paths that do not invent missing arrays or entries.
- Cleared callbacks when slots are removed and refreshed slots when ECharts reuses formatter payloads.
- In
manual-updatemode, callback-slot additions and removals remain pending until the next manualsetOptioncall.
vue-echarts/graphic
- Added
GEllipsewithcx,cy,rx, andryshape props. - Added
auto-batchand expanded path, text, transform, clipping, tooltip, state, style, transition, animation, andduringprop coverage. - Narrowed each
G*component to the props and slots its ECharts element type actually accepts; onlyGGroupexposes a default child slot. - Added
dblclick,contextmenu, and.oncegraphic handlers; returningtruefrom a graphic handler stops bubbling. - Preserved element order, parent changes, handler identity, and duplicate-ID diagnostics across graphic updates.
- Allowed graphic-only charts to omit the
optionprop.#graphiccontinues to replaceoption.graphic, with a warning when both sources are supplied. - Removed the unusable
GCompoundPathexport because the ECharts graphic component rejectscompoundPathelements at runtime.
Smart update and option flow
- Improved smart updates for built-in and custom components, nested options, timelines, media, and graphic children. Removals and reorders now apply correctly while ordinary updates preserve interaction state where possible.
- Forwarded explicit
update-optionsdirectly to ECharts and correctly reconciled the next automatic update. - Kept graphic
$actionupdates on the existing tree, preventedclear()from being undone by later theme changes, and treated temporaryoptionremoval as a pause instead of restoring stale data.
Theme, initialization, manual mode, and lifecycle
- Applied explicit props before injected defaults, including an empty theme string, and detected deep theme and init-option changes.
- Replayed the latest automatic or graphic-only option after theme changes without restoring options cleared by the user.
- Re-initialized the chart when
init-optionsormanual-updatemode changes and clearedgroupwhen the prop is removed. - Stopped deeply observing
optionafter the initial render in manual mode, preserved positionalsetOptioncalls, and gave early manual calls precedence over deferred rendering. - Stopped all component-managed updates and pending graphic work after disposal or unmounting.
- Kept the chart alive across DOM moves and disposed it only when the custom-element root remains disconnected after the current microtask.
- Kept server rendering side-effect free: Vue SSR emits the chart container and ECharts initializes only after browser mount.
Autoresize and styles
- Observed the ECharts host container's content-box size, skipping zero-sized and unchanged resizes, throttling recovery, and invoking
onResizeonly after a real chart resize. - Resized before the deferred first render and prevented pending resize callbacks after cleanup.
- Preserved automatic base-style injection in both JavaScript entry bundles;
vue-echarts/style.cssremains available for shadow roots, other documents, and restrictive CSP environments.
Performance
- Reduced unnecessary work in manual mode and when autoresize is disabled, and batched listener, loading, graphic, theme, and slot updates.
Bundles
- Fixed the global CDN bundle to work with the full
echartspackage while preserving named exports on its default global export.