Skip to content

Interpolation Chart

Last updated 27 Oct 2026

NbInterpolationChart visualises a piecewise-linear mapping between two numeric scales and lets users calibrate the curve by dragging, adding, or removing control points.

Props ​

PropTypeDefaultDescription
modelValueIInterpolationPoint[][]The mapping points. Supports v-model.
inputLabelstring-Label for the X (input) axis
outputLabelstring-Label for the Y (output) axis
inputMinnumber0Minimum allowed input value
inputMaxnumber100Maximum allowed input value
outputMinnumber0Minimum allowed output value
outputMaxnumber100Maximum allowed output value
editablebooleantrueEnable drag, add, and remove interactions
minPointsnumber2Minimum number of points (cannot remove below this)
inputStepnumber0Snap input values to this step (0 = no snap)
outputStepnumber0Snap output values to this step (0 = no snap)
titlestring-Chart title
subtitlestring-Secondary descriptive line
heightnumber | string280Container height
showTooltipbooleantrueShow tooltip on hover/drag
showGridbooleantrueRender Y-axis gridlines

Events ​

EventPayloadDescription
update:modelValueIInterpolationPoint[]Emitted after each edit (sorted by input)

Types ​

typescript
interface IInterpolationPoint {
  input: number
  output: number
}

Notes ​

  • Points are always emitted sorted by input (ascending).
  • While dragging, a point's input value is clamped between its neighbours so points never cross.
  • The chart uses piecewise linear interpolation (straight lines between points), matching the actual interpolation algorithm used by devices.
  • Input/output step snapping helps users land on clean values (e.g. 0.5C increments).