pissang commented on a change in pull request #16493:
URL: https://github.com/apache/echarts/pull/16493#discussion_r804385000



##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -31,9 +31,10 @@ import type ContinuousModel from 
'../../component/visualMap/ContinuousModel';
 import { CoordinateSystem, isCoordinateSystemType } from 
'../../coord/CoordinateSystem';
 import { StageHandlerProgressParams, Dictionary, OptionDataValue } from 
'../../util/types';
 import type Cartesian2D from '../../coord/cartesian/Cartesian2D';
-import type Calendar from '../../coord/calendar/Calendar';
+import Calendar from '../../coord/calendar/Calendar';
 import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle';
 import Element from 'zrender/src/Element';
+import { RectLike, RectShape } from 'zrender';

Review comment:
       Avoid importing from the 'zrender'. It may import the whole package.

##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -205,6 +206,8 @@ class HeatmapView extends ChartView {
         let emphasisStyle = seriesModel.getModel(['emphasis', 
'itemStyle']).getItemStyle();
         let blurStyle = seriesModel.getModel(['blur', 
'itemStyle']).getItemStyle();
         let selectStyle = seriesModel.getModel(['select', 
'itemStyle']).getItemStyle();
+        const itemStyle = seriesModel.getModel(['itemStyle']);

Review comment:
       Also `borderRadius` should support to be configured per data item. Like 
`emphasisStyle`, we can override the `borderRadius` in the `data.hasItemOption` 
branch below.

##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -260,10 +271,17 @@ class HeatmapView extends ChartView {
                 if (isNaN(data.get(dataDims[1], idx) as number)) {
                     continue;
                 }
+                const shape: RectLike & {

Review comment:
       Try using the type `graphic.Rect['shape']`

##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -245,13 +248,21 @@ class HeatmapView extends ChartView {
                     dataDimY
                 ]);
 
+                const shape: RectShape & {

Review comment:
       The type can be `graphic.Rect['shape']`

##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -205,6 +206,8 @@ class HeatmapView extends ChartView {
         let emphasisStyle = seriesModel.getModel(['emphasis', 
'itemStyle']).getItemStyle();
         let blurStyle = seriesModel.getModel(['blur', 
'itemStyle']).getItemStyle();
         let selectStyle = seriesModel.getModel(['select', 
'itemStyle']).getItemStyle();
+        const itemStyle = seriesModel.getModel(['itemStyle']);

Review comment:
       No need to get a temporary model here. Just 
`seriesModel.get(['itemStyle', borderRadius']);`




-- 
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]

Reply via email to