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 2021/04/21 08:26:12 UTC

[GitHub] [echarts] xiaoyueguang opened a new issue #14733: Lines are not aligned in Heatmap

xiaoyueguang opened a new issue #14733:
URL: https://github.com/apache/echarts/issues/14733


   ### Version
   5.1.0
   
   ### Reproduction link
   [https://jsfiddle.net/mdgjno6w/](https://jsfiddle.net/mdgjno6w/)
   
   ### Steps to reproduce
   open this [link](https://jsfiddle.net/mdgjno6w/)
   
   ### What is expected?
   the lines are straight
   
   ### What is actually happening?
   Lines are not aligned
   
   ---
   I feel that the main reason for this is that things here are calculated to a decimal point 
   
   ```js
   HeatmapView2.prototype._renderOnCartesianAndCalendar
   
   width = (xAxis.getBandWidth());
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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


[GitHub] [echarts] xiaoyueguang commented on issue #14733: Lines are not aligned in Heatmap

Posted by GitBox <gi...@apache.org>.
xiaoyueguang commented on issue #14733:
URL: https://github.com/apache/echarts/issues/14733#issuecomment-824452580


   > Seems so. Would you mind making a PR to fix this?
   
   I found out how this problem arises.
   
   ```ts
     // src/chart/heatmap/HeatmapView.ts
     rect = new graphic.Rect({
         shape: {
             x: Math.floor(Math.round(point[0]) - width / 2),
             y: Math.floor(Math.round(point[1]) - height / 2),
             width: Math.ceil(width),
             height: Math.ceil(height)
         },
         style
     });
   ```
   
   x, y, width and height in Shape possible calculation error.
   
   * If you want to render perfect, these lengths need to keep a decimal point, this will cause performance issues.
   * If set these lengths to int, there will be a bit of coverage or gaps when rendering. like this [demo](https://jsfiddle.net/mdgjno6w/)
   
   So I now use this to ensure perfect rendering:
   
   * Set the `grid.width` to be an integer multiple of `xAxis.count`
   
   


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #14733: Lines are not aligned in Heatmap

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14733:
URL: https://github.com/apache/echarts/issues/14733#issuecomment-823880013


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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


[GitHub] [echarts] Ovilia commented on issue #14733: Lines are not aligned in Heatmap

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #14733:
URL: https://github.com/apache/echarts/issues/14733#issuecomment-825360701


   @xiaoyueguang Please link this issue when you are ready to make a pull request.


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


[GitHub] [echarts] plainheart commented on issue #14733: Lines are not aligned in Heatmap

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #14733:
URL: https://github.com/apache/echarts/issues/14733#issuecomment-823929509


   Seems so. Would you mind making a PR to fix this?


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