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

Class SliderTimelineView

src/component/timeline/SliderTimelineView.ts:81–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81class SliderTimelineView extends TimelineView {
82
83 static type = 'timeline.slider';
84 type = SliderTimelineView.type;
85
86 api: ExtensionAPI;
87 model: SliderTimelineModel;
88 ecModel: GlobalModel;
89
90 private _axis: TimelineAxis;
91
92 private _viewRect: BoundingRect;
93
94 private _timer: number;
95
96 private _currentPointer: TimelineSymbol;
97
98 private _progressLine: graphic.Line;
99
100 private _mainGroup: graphic.Group;
101
102 private _labelGroup: graphic.Group;
103
104 private _tickSymbols: graphic.Path[];
105 private _tickLabels: graphic.Text[];
106
107 init(ecModel: GlobalModel, api: ExtensionAPI) {
108 this.api = api;
109 }
110
111 /**
112 * @override
113 */
114 render(timelineModel: SliderTimelineModel, ecModel: GlobalModel, api: ExtensionAPI) {
115 this.model = timelineModel;
116 this.api = api;
117 this.ecModel = ecModel;
118
119 this.group.removeAll();
120
121 if (timelineModel.get('show', true)) {
122
123 const layoutInfo = this._layout(timelineModel, api);
124 const mainGroup = this._createGroup('_mainGroup');
125 const labelGroup = this._createGroup('_labelGroup');
126
127 const axis = this._axis = this._createAxis(layoutInfo, timelineModel);
128
129 timelineModel.formatTooltip = function (dataIndex: number) {
130 const name = axis.scale.getLabel({value: dataIndex});
131 return createTooltipMarkup('nameValue', { noName: true, value: name });
132 };
133
134 each(
135 ['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'] as const,
136 function (name) {
137 this['_render' + name as RenderMethodName](layoutInfo, mainGroup, axis, timelineModel);
138 },

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…