You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/07/19 06:25:22 UTC

[GitHub] [incubator-echarts] pissang commented on a change in pull request #12991: fix(heatmap) Skip rendering for data out of axis content in heatmap (#12969)

pissang commented on a change in pull request #12991:
URL: https://github.com/apache/incubator-echarts/pull/12991#discussion_r456867080



##########
File path: src/chart/heatmap/HeatmapView.ts
##########
@@ -203,8 +206,8 @@ class HeatmapView extends ChartView {
             let rect;
 
             if (isCoordinateSystemType<Cartesian2D>(coordSys, 'cartesian2d')) {
-                // Ignore empty data
-                if (isNaN(data.get(dataDims[2], idx) as number)) {
+                // Ignore empty data and out of extent data
+                if (isNaN(data.get(dataDims[2], idx) as number) || data.get(dataDims[0], idx) < xAxisExtent[0] || data.get(dataDims[0], idx) > xAxisExtent[1]) {
                     continue;

Review comment:
       data.get(dataDims[0], idx) is better to be assigned to a temporal variable.
   
   Also, yAxis should also be checked?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org