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.
Parameters
Section titled “Parameters”uPlot
dataMin
Section titled “dataMin”number
dataMax
Section titled “dataMax”number
_scaleKey
Section titled “_scaleKey”string
Returns
Section titled “Returns”MinMax