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

Class Single

src/coord/single/Single.ts:43–242  ·  view source on GitHub ↗

* Create a single coordinates system.

Source from the content-addressed store, hash-verified

41 * Create a single coordinates system.
42 */
43class Single implements CoordinateSystem, CoordinateSystemMaster {
44
45 readonly type = COORD_SYS_TYPE_SINGLE;
46
47 readonly dimension = 'single';
48 /**
49 * Add it just for draw tooltip.
50 */
51 readonly dimensions = singleDimensions;
52
53 name: string;
54
55 axisPointerEnabled: boolean = true;
56
57 model: SingleAxisModel;
58
59 private _axis: SingleAxis;
60
61 private _rect: BoundingRect;
62
63 constructor(axisModel: SingleAxisModel, ecModel: GlobalModel, api: ExtensionAPI) {
64
65 this.model = axisModel;
66
67 this._init(axisModel, ecModel, api);
68 }
69
70 /**
71 * Initialize single coordinate system.
72 */
73 _init(axisModel: SingleAxisModel, ecModel: GlobalModel, api: ExtensionAPI) {
74
75 const dim = this.dimension;
76
77 const axisType = axisHelper.determineAxisType(axisModel);
78 const axis = new SingleAxis(
79 dim,
80 axisHelper.createScaleByModel(axisModel, axisType, true),
81 [0, 0],
82 axisType,
83 axisModel.get('position')
84 );
85
86 axis.onBand = axisHelper.isAxisOnBand(axis.scale, axisModel);
87 axis.inverse = axisModel.get('inverse');
88 axis.orient = axisModel.get('orient');
89
90 axisModel.axis = axis;
91 axis.model = axisModel;
92 axis.coordinateSystem = this;
93 this._axis = axis;
94 }
95
96 /**
97 * Update axis scale after data processed
98 */
99 update(ecModel: GlobalModel, api: ExtensionAPI) {
100 const axis = this._axis;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…