MCPcopy Index your code
hub / github.com/apache/echarts / getAxisRawValue

Function getAxisRawValue

src/coord/axisHelper.ts:236–243  ·  view source on GitHub ↗
(axis: Axis, tick: ScaleTick)

Source from the content-addressed store, hash-verified

234}
235
236export function getAxisRawValue<TIsCategory extends boolean>(axis: Axis, tick: ScaleTick):
237 TIsCategory extends true ? string : number {
238 // In category axis with data zoom, tick is not the original
239 // index of axis.data. So tick should not be exposed to user
240 // in category axis.
241 const scale = axis.scale;
242 return (isOrdinalScale(scale) ? scale.getLabel(tick) : tick.value) as any;
243}
244
245/**
246 * @param model axisLabelModel or axisTickModel

Callers 1

makeLabelFormatterFunction · 0.85

Calls 2

isOrdinalScaleFunction · 0.90
getLabelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…