* @override
(timelineModel: SliderTimelineModel, ecModel: GlobalModel, api: ExtensionAPI)
| 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 |
nothing calls this directly
no test coverage detected