Skip to main content

Interface: UPlotLike

Defined in: packages/sdvplot/src/uplot.ts:24

The subset of a uPlot chart this adapter reads: new uPlot(...) is one.

Properties​

bbox​

readonly bbox: object

Defined in: packages/sdvplot/src/uplot.ts:28

The plot area in canvas pixels.

height​

height: number

left​

left: number

top​

top: number

width​

width: number


ctx​

readonly ctx: CanvasRenderingContext2D

Defined in: packages/sdvplot/src/uplot.ts:26

The canvas' 2D context.


data​

readonly data: readonly ArrayLike<number | null | undefined>[]

Defined in: packages/sdvplot/src/uplot.ts:30

The chart's data: x values first, then one array per series.

Methods​

redraw()​

redraw(rebuildPaths?, recalcAxes?): void

Defined in: packages/sdvplot/src/uplot.ts:34

Redraws the chart (rebuildPaths: false reuses the series paths).

Parameters​

rebuildPaths?​

boolean

recalcAxes?​

boolean

Returns​

void


valToPos()​

valToPos(val, scaleKey, canvasPixels?): number

Defined in: packages/sdvplot/src/uplot.ts:32

A value on scale scaleKey as a position (canvas pixels with canvasPixels).

Parameters​

val​

number

scaleKey​

string

canvasPixels?​

boolean

Returns​

number