MCPcopy Index your code
hub / github.com/apache/echarts / render

Method render

src/component/timeline/SliderTimelineView.ts:114–149  ·  view source on GitHub ↗

* @override

(timelineModel: SliderTimelineModel, ecModel: GlobalModel, api: ExtensionAPI)

Source from the content-addressed store, hash-verified

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 },
139 this
140 );
141
142 this._renderAxisLabel(layoutInfo, labelGroup, axis, timelineModel);
143 this._position(layoutInfo, timelineModel);
144 }
145
146 this._doPlayStop();
147
148 this._updateTicksStatus();
149 }
150
151 /**
152 * @override

Callers

nothing calls this directly

Calls 11

_layoutMethod · 0.95
_createGroupMethod · 0.95
_createAxisMethod · 0.95
_renderAxisLabelMethod · 0.95
_positionMethod · 0.95
_doPlayStopMethod · 0.95
_updateTicksStatusMethod · 0.95
createTooltipMarkupFunction · 0.90
eachFunction · 0.50
getMethod · 0.45
getLabelMethod · 0.45

Tested by

no test coverage detected