MCPcopy
hub / github.com/apache/echarts / getIntervalPrecision

Function getIntervalPrecision

src/scale/helper.ts:147–152  ·  view source on GitHub ↗
(niceInterval: number)

Source from the content-addressed store, hash-verified

145}
146
147export function getIntervalPrecision(niceInterval: number): number {
148 // Tow more digital for tick.
149 // NOTE: `2` was introduced in commit `af2a2a9f6303081d7c3b52f0a38add07b4c6e0c7`;
150 // it works on "nice" interval, but seems not necessarily mathematically required.
151 return getPrecision(niceInterval) + 2;
152}
153
154/**
155 * Lookup table to avoid rounding error - if the value before transformed is in `lookup.from[i]`,

Callers 8

getMinorTicksFunction · 0.90
setConfigMethod · 0.90
logScaleCalcNiceTicksFunction · 0.90
loopIncreaseIntervalFunction · 0.90
scaleCalcAlignFunction · 0.90
intervalScaleNiceTicksFunction · 0.85

Calls 1

getPrecisionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…