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

Method render

src/chart/heatmap/HeatmapView.ts:102–135  ·  view source on GitHub ↗
(seriesModel: HeatmapSeriesModel, ecModel: GlobalModel, api: ExtensionAPI)

Source from the content-addressed store, hash-verified

100 private _progressiveEls: Element[];
101
102 render(seriesModel: HeatmapSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) {
103 let visualMapOfThisSeries;
104 ecModel.eachComponent('visualMap', function (visualMap: VisualMapModel) {
105 visualMap.eachTargetSeries(function (targetSeries) {
106 if (targetSeries === seriesModel) {
107 visualMapOfThisSeries = visualMap;
108 }
109 });
110 });
111
112 if (__DEV__) {
113 if (!visualMapOfThisSeries) {
114 throw new Error('Heatmap must use with visualMap');
115 }
116 }
117
118 // Clear previously rendered progressive elements.
119 this._progressiveEls = null;
120
121 this.group.removeAll();
122
123 const coordSys = seriesModel.coordinateSystem;
124 if (coordSys.type === 'cartesian2d'
125 || coordSys.type === 'calendar'
126 || coordSys.type === 'matrix'
127 ) {
128 this._renderOnGridLike(seriesModel, api, 0, seriesModel.getData().count());
129 }
130 else if (isGeoLikeCoordSys(coordSys)) {
131 this._renderOnGeo(
132 coordSys, seriesModel, visualMapOfThisSeries, api
133 );
134 }
135 }
136
137 incrementalPrepareRender(seriesModel: HeatmapSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) {
138 this.group.removeAll();

Callers 1

incrementalRenderMethod · 0.95

Calls 7

_renderOnGridLikeMethod · 0.95
_renderOnGeoMethod · 0.95
isGeoLikeCoordSysFunction · 0.90
eachComponentMethod · 0.80
eachTargetSeriesMethod · 0.80
countMethod · 0.65
getDataMethod · 0.65

Tested by

no test coverage detected