コンテンツにスキップ

safeYRange

このコンテンツはまだ日本語訳がありません。

safeYRange(_u, dataMin, dataMax, _scaleKey): MinMax

Defined in: components/TimeSeriesChart.tsx:15

Custom y-axis range function that prevents uPlot’s axis split function from crashing with near-constant data.

When all y-values are nearly identical, the default range calculation produces such a tiny axis range that the tick generation loop tries to create an impossibly large array (RangeError: Invalid array length).

Enforces a minimum visible range proportional to the data’s magnitude.

uPlot

number

number

string

MinMax