pissang commented on a change in pull request #16493:
URL: https://github.com/apache/echarts/pull/16493#discussion_r805573629
##########
File path: test/heatmap-geo.html
##########
@@ -5,109 +5,99 @@
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
Review comment:
Please avoid using any autoformat tool to format the code.
##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -260,30 +265,39 @@ class HeatmapView extends ChartView {
if (isNaN(data.get(dataDims[1], idx) as number)) {
continue;
}
+ const shape: RectShape =
coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape;
Review comment:
This change of creating a temporary variable `shape` can be undo. So
there is no necessity of using type `RectShape`.
##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -260,30 +265,39 @@ class HeatmapView extends ChartView {
if (isNaN(data.get(dataDims[1], idx) as number)) {
continue;
}
+ const shape: RectShape =
coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape;
rect = new graphic.Rect({
z2: 1,
- shape: coordSys.dataToRect([data.get(dataDims[0],
idx)]).contentShape,
+ shape,
style
});
}
- const itemModel = data.getItemModel<HeatmapDataItemOption>(idx);
-
// Optimization for large datset
if (data.hasItemOption) {
+ const itemModel =
data.getItemModel<HeatmapDataItemOption>(idx);
Review comment:
There is already an `itemModel`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]