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

Function initLinearScaleMapper

src/scale/scaleMapper.ts:401–417  ·  view source on GitHub ↗
(
    // If input `null/undefined`, a mapper will be created.
    mapper: ScaleMapper | NullUndefined,
    initialExtent: number[] | NullUndefined
)

Source from the content-addressed store, hash-verified

399}
400
401export function initLinearScaleMapper(
402 // If input `null/undefined`, a mapper will be created.
403 mapper: ScaleMapper | NullUndefined,
404 initialExtent: number[] | NullUndefined
405): ScaleMapper {
406 const linearMapper = (mapper || {}) as LinearScaleMapper;
407
408 const extendList: number[][] = [];
409 // @ts-ignore
410 linearMapper._extents = extendList;
411
412 extendList[SCALE_EXTENT_KIND_EFFECTIVE] = initialExtent ? initialExtent.slice() : initExtentForUnion();
413
414 extend(linearMapper, linearScaleMapperMethods);
415
416 return linearMapper;
417}
418
419const linearScaleMapperMethods: ScaleMapperGeneric<LinearScaleMapper> = {
420

Callers 2

constructorMethod · 0.90
initBreakOrLinearMapperFunction · 0.85

Calls 2

initExtentForUnionFunction · 0.90
extendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…