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/10/28 14:18:38 UTC

[GitHub] [incubator-echarts] anoosurf opened a new issue #13504: charts appear blur on canvas - make crisp

anoosurf opened a new issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504


   ### Version
   4.9.0
   
   ### Steps to reproduce
   show any bar chart on different screen resolutions / pixel ratio it shows blur on edges
   
   ### What is expected?
   it should be crisp like highcharts.com or svg borders
   
   ### What is actually happening?
   the dimensions are in float number and not rounded
   
   <!-- 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] [incubator-echarts] anoosurf commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-717972399


   ![image](https://user-images.githubusercontent.com/4696146/97450001-43307e00-1958-11eb-9186-125489a5be92.png)
   


----------------------------------------------------------------
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] [incubator-echarts] plainheart commented on issue #13504: charts appear blur on canvas - make crisp

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


   Could you please try to check if this issue exists in 5.0? You may use the version 5.0.0-beta.2.


----------------------------------------------------------------
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] [incubator-echarts] TaylorPzreal commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
TaylorPzreal commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-726713880


   Is there has a version that doesn't has this error?
   my echarts version is 4.9.0 and has this same error;
   


----------------------------------------------------------------
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] [incubator-echarts] anoosurf removed a comment on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf removed a comment on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-717967072


   ![image](https://user-images.githubusercontent.com/4696146/97448896-22b3f400-1957-11eb-9ebb-6c0060c49d09.png)
   


----------------------------------------------------------------
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] [incubator-echarts] anoosurf commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-717967072


   ![image](https://user-images.githubusercontent.com/4696146/97448896-22b3f400-1957-11eb-9ebb-6c0060c49d09.png)
   


----------------------------------------------------------------
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] [incubator-echarts] plainheart commented on issue #13504: charts appear blur on canvas - make crisp

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


   Thanks for the check. Just found you had gotten involved in this issue in #13504. It may still take some time to fix it. 


----------------------------------------------------------------
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] [incubator-echarts] anoosurf commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-717967366


   ![image](https://user-images.githubusercontent.com/4696146/97448984-38291e00-1957-11eb-9850-dd92fc15f6f8.png)
   


----------------------------------------------------------------
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] [incubator-echarts] echarts-bot[bot] commented on issue #13504: charts appear blur on canvas - make crisp

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


   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] [incubator-echarts] anoosurf commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-718334276


   yes i just checked right now .. the issue exists in the latest beat
   versionof 5.0.0 beta-2 also
   
   
   i tried a quick fix like this below to make the rectangle sharper  .. but
   it doesn't work everytime :(
   
   
   
      rect: function (x, y, w, h) {
               //edit 22/10/2020
               // for columns
               x = Math.round(x) + 0.5;
               y = Math.round(y) + 0.5;
               w = Math.round(w);
               h = Math.round(h);
   
               //if (x % 2 !== 0) { // hack  for odd heights
               //    x = Math.round(x) ;
               //}
               //if (y % 2 !== 0) { // hack  for odd heights
               //    y = Math.round(y) ;
               //}
   
               //if (h % 2 !== 0) { // hack  for odd heights
               //    x = Math.round(x);
               //    y = Math.round(y);
               //}
               if (h >= 15) { // hack  for bars
                   x = Math.round(x);
                   y = Math.round(y);
               }
   
               //console.log('x:' + x + ' y:' + y + ' w:' + w + ' h:' + h);
   
   
               this._ctx && this._ctx.rect(x, y, w, h);
               this.addData(CMD.R, x, y, w, h);
               return this;
           },
   
   On Thu, Oct 29, 2020 at 6:21 AM Zhongxiang.Wang <no...@github.com>
   wrote:
   
   > Could you please try to check if this issue exists in 5.0? You may use the
   > version 5.0.0-beta.2.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-echarts/issues/13504#issuecomment-718290922>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ABD2QUTGN3ED6G5IUPS4PB3SNC4CRANCNFSM4TCMMHZA>
   > .
   >
   


----------------------------------------------------------------
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] [incubator-echarts] TaylorPzreal commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
TaylorPzreal commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-726740137


   After i read ```zrender``` source code, i found how to trigger this problem in my case;
   
   First the ```zrender``` [src/config.ts](https://github.com/ecomfe/zrender/blob/master/src/config.ts) portion code:
   
   ```ts
   let dpr = 1;
   
   // If in browser environment
   if (typeof window !== 'undefined') {
       dpr = Math.max(window.devicePixelRatio 
       	|| ((window.screen as any).deviceXDPI / (window.screen as any).logicalXDPI) 
       	|| 1, 1);
   }
   ```
   
   As you can see, ```zrender``` use ```window.devicePixelRatio ``` to set pixel almost any time in today browser if you don't config this, and my case is:
   
   First i displayed my webpage on a low pixel screen(1PX), and then i dragged the browser to mac screen(2PX), so i found this problem.
   
   So it's okay for me. Just for sharing my case.
   


----------------------------------------------------------------
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] [incubator-echarts] anoosurf commented on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
anoosurf commented on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-717974160


   maybe a solution could be rounding of the drawing rectangle dimensions and/or shifting of canvas context to adjust for half pixel?
   please do assist ASAP as this will make the charts even more great to look at :) 
   thanks


----------------------------------------------------------------
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] [incubator-echarts] plainheart edited a comment on issue #13504: charts appear blur on canvas - make crisp

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #13504:
URL: https://github.com/apache/incubator-echarts/issues/13504#issuecomment-718336792


   Thanks for the check. Just found you had gotten involved in this issue in #8620. It may still take some time to fix it. 


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