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

Function makeRealNumberLabels

src/coord/axisTickLabelBuilder.ts:283–295  ·  view source on GitHub ↗
(axis: Axis)

Source from the content-addressed store, hash-verified

281}
282
283function makeRealNumberLabels(axis: Axis): ReturnType<typeof createAxisLabels> {
284 const ticks = axis.scale.getTicks();
285 const labelFormatter = makeLabelFormatter(axis);
286 return {
287 labels: zrUtil.map(ticks, function (tick, idx) {
288 return {
289 formattedLabel: labelFormatter(tick, idx),
290 rawLabel: axis.scale.getLabel(tick),
291 tick: tick,
292 };
293 })
294 };
295}
296
297// Large category data calculation is performance sensitive, and ticks and label probably will
298// be fetched multiple times (e.g. shared by splitLine and axisTick). So we cache the result.

Callers 1

createAxisLabelsFunction · 0.85

Calls 4

makeLabelFormatterFunction · 0.90
getTicksMethod · 0.45
mapMethod · 0.45
getLabelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…