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

Method getLabel

src/scale/Ordinal.ts:311–319  ·  view source on GitHub ↗

* Get item on tick

(tick: ScaleTick)

Source from the content-addressed store, hash-verified

309 * Get item on tick
310 */
311 getLabel(tick: ScaleTick): string {
312 if (!this.isBlank()) {
313 const ordinalNumber = this.getRawOrdinalNumber(tick.value);
314 const category = this._ordinalMeta.categories[ordinalNumber];
315 // Note that if no data, ordinalMeta.categories is an empty array.
316 // Return empty if it's not exist.
317 return category == null ? '' : category + '';
318 }
319 }
320
321 /**
322 * NOTICE: This is different from `.getOrdinalMeta().length` when extent

Callers

nothing calls this directly

Calls 1

getRawOrdinalNumberMethod · 0.95

Tested by

no test coverage detected