chart.measure
Configuration Structure
chart: {}The measure options add a measure/delta ruler. Hold key and drag from A to B on the plot (or call chart.startMeasure()) to read the change, percent change, range, and slope between two points in data space. On release the ruler pins as a data-anchored overlay that re-projects on zoom and resize. It needs the measure feature (import 'apexcharts/features/measure') and fires the measured event. See the Measure ruler guide. It is part of the chart configuration.
enabled
falseEnable the measure tool. Requires import 'apexcharts/features/measure'.
mode
'span'span(default): a finance-style vertical band between two x-positions with a change / percent / range readout, endpoints snapped to the first series.free: a diagonal ruler between two arbitrary points.
key
'm'The key held to arm a drag when not driving the ruler from code.
pinOnRelease
truePin the ruler as a persistent, data-anchored overlay when the drag is released. It re-projects when the chart is zoomed or resized.
colors
Semantic colors for the readout as { up, down, neutral, guide }. Every element also carries a stable CSS class plus a direction class (apexcharts-measure-up / -down / -flat) for stylesheet theming through --apx-measure-* tokens.
band
trueSpan mode: draw the shaded band between the two x-positions.
guides
trueSpan mode: draw the vertical dashed reference lines at each endpoint.
markers
trueDraw the endpoint dots on the series line.
format
Value formatters for the readout: { x, y, percent }, each a function returning a string.
label
Full readout override. A function that receives the measure info (from, to, dx, dy, percentChange, slope, mode) and returns a string or an array of lines.