Components
Vue3 Plots exposes small visual components for building charts. SVG plot layers can be stacked inside the same relatively positioned container; components that render data in that coordinate system should receive the same size, padding, and domain values so their coordinates align. Use TransformGroup to provide those values once to the layers inside it.
Shared data types are exported from the package:
ts
type PlotPoint<T = unknown> = { x: number; y: number; data?: T }
interface PlotDomain { xMin: number; xMax: number; yMin: number; yMax: number }
interface PlotSize { width: number; height: number }
interface PlotPadding { top: number; right: number; bottom: number; left: number }
type MaybeArray<T> = T | T[]
type Scale = (value: number) => number
type AnyShape = Rect | Ellipse | PolygonComponent Docs
API Docs
Layer Order
A common static chart order is:
GridLineor other data layersScatterAxisXLabelandYLabel
MouseDraw is interactive and usually goes above visual layers when selection or annotation drawing is enabled.