Skip to content

v8.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Aug 02:22

Component API and TypeScript

  • Added typed, read-only chart and root properties. chart follows chart re-initialization and becomes unavailable when the component is disposed; root exposes the mounted <x-vue-echarts> element.
  • Exposed more current ECharts instance methods: getZr, getId, isSSR, getDevicePixelRatio, makeActionFromEvent, updateLabelLayout, convertToLayout, getVisual, renderToCanvas, renderToSVGString, and getSvgDataURL.
  • 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 AutoResize and LoadingOptions from the package root.
  • Published the #graphic slot 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, and onZr:mouseMove, while retaining lower-case forms.
  • Allowed reactive injected theme, init, update, and loading options to resolve to null or undefined; an explicit prop still takes precedence over its injected value.

Loading

  • Added the loading-type prop for selecting registered ECharts loading effects and allowed effect-specific fields in loading-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 .once handlers 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-update mode, callback-slot additions and removals remain pending until the next manual setOption call.

vue-echarts/graphic

  • Added GEllipse with cx, cy, rx, and ry shape props.
  • Added auto-batch and expanded path, text, transform, clipping, tooltip, state, style, transition, animation, and during prop coverage.
  • Narrowed each G* component to the props and slots its ECharts element type actually accepts; only GGroup exposes a default child slot.
  • Added dblclick, contextmenu, and .once graphic handlers; returning true from 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 option prop. #graphic continues to replace option.graphic, with a warning when both sources are supplied.
  • Removed the unusable GCompoundPath export because the ECharts graphic component rejects compoundPath elements 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-options directly to ECharts and correctly reconciled the next automatic update.
  • Kept graphic $action updates on the existing tree, prevented clear() from being undone by later theme changes, and treated temporary option removal 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-options or manual-update mode changes and cleared group when the prop is removed.
  • Stopped deeply observing option after the initial render in manual mode, preserved positional setOption calls, 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 onResize only 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.css remains 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 echarts package while preserving named exports on its default global export.