MCPcopy
hub / github.com/nhn/tui.chart / getValidIndex

Function getValidIndex

apps/chart/src/component/plot.ts:21–23  ·  view source on GitHub ↗
(index: number, startIndex = 0)

Source from the content-addressed store, hash-verified

19};
20
21function getValidIndex(index: number, startIndex = 0) {
22 return ~~index ? index - startIndex : index;
23}
24
25function validXPosition({ axisData, offsetSize, value, startIndex = 0 }: XPositionParam) {
26 const dataIndex = getValidIndex(value as number, startIndex);

Callers 1

validXPositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected