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/05/24 09:26:26 UTC

[GitHub] [echarts] mindon opened a new issue #15023: Grid border not closed at left-top corner (no z in SVG path)

mindon opened a new issue #15023:
URL: https://github.com/apache/echarts/issues/15023


   ### Version
   v5.1.1
   
   ### Reproduction link
   [https://qp9zl.csb.app/](https://qp9zl.csb.app/)
   
   ### Steps to reproduce
   render with option 
   ```
   const option = {
           grid: {
             show: true,
             borderWidth: 3,
             borderColor: "#000000"
           }
         };
   ```
   
   ### What is expected?
   corner closed
   
   ### What is actually happening?
   corner not closed
   
   <!-- 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] pissang edited a comment on issue #15023: Grid border not closed at left-top corner (no z in SVG path)

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15023:
URL: https://github.com/apache/echarts/issues/15023#issuecomment-847510964


   @plainheart I thought the first point and the last point has been connected in the `roundRect.ts` helper so there is no need to do `closePath` again, which is an extra cost in the case that drawing lots of rect(like in benchmark.html). But it seems to be a mistake in this case.
   
   Also, only the SVG renderer that drawing a rectangle without border-radius will have this issue. Because canvas renderer will use `ctx.rect` command, which is closed underlying automatically. And drawing rectangle with `border-radius` also has no issue because there is an `arc` command connecting the first point and last point, which is like:
   
   ![image](https://user-images.githubusercontent.com/841551/119437249-51a91180-bd50-11eb-9837-475d6eaf3397.png)
   
   So I think what we need is adding an `Z` command when rendering `rect` command in the SVG renderer https://github.com/ecomfe/zrender/blob/9780bd81795010b7e99f77b907c7530552184942/src/svg/graphic.ts#L234
   It can keep both performance in the canvas and correctness in the svg


-- 
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 #15023: Grid border not closed at left-top corner (no z in SVG path)

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


   @pissang Yes. I agree with you. That's right.


-- 
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] pissang closed issue #15023: Grid border not closed at left-top corner (no z in SVG path)

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15023:
URL: https://github.com/apache/echarts/issues/15023


   


-- 
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: commits-unsubscribe@echarts.apache.org

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 #15023: Grid border not closed at left-top corner (no z in SVG path)

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


   This issue is labeled with `difficulty: easy`.
   @mindon Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
   
   Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓


-- 
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] pissang edited a comment on issue #15023: Grid border not closed at left-top corner (no z in SVG path)

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15023:
URL: https://github.com/apache/echarts/issues/15023#issuecomment-847510964


   @plainheart I thought the first point and the last point has been connected in the `roundRect.ts` helper so there is no need to do `closePath` again, which is an extra cost in the case that drawing lots of rect(like in benchmark.html). But it seems to be a mistake in this case.
   
   Also, only the SVG renderer that drawing a rectangle without border-radius will have this issue. Because canvas renderer will use `ctx.rect` command, which is closed underlying automatically. And drawing rectangle with `border-radius` also has no issue because there is an `arc` command connecting the first point and last point, which is like:
   
   ![image](https://user-images.githubusercontent.com/841551/119437249-51a91180-bd50-11eb-9837-475d6eaf3397.png)
   
   So I think what we need is adding an `Z` command when rendering `rect` command in the SVG renderer https://github.com/ecomfe/zrender/blob/9780bd81795010b7e99f77b907c7530552184942/src/svg/graphic.ts#L235
   It can keep both performance in the canvas and correctness in the svg


-- 
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 #15023: Grid border not closed at left-top corner (no z in SVG path)

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   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] pissang commented on issue #15023: Grid border not closed at left-top corner (no z in SVG path)

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


   @plainheart I thought the first point and the last point has been connected in the `roundRect.ts` helper so there is no need to do `closePath` again, which is an extra cost in the case that drawing lots of rect(like in benchmark.html). But it seems to be a mistake in this case.
   
   Also, only the SVG renderer that drawing a rectangle without border-radius will have this issue. Because canvas renderer will use `ctx.rect` command, which is closed underlying automatically. And drawing rectangle with `border-radius` also has no issue because there is an `arc` command connecting the first point and last point, which is like:
   
   ![image](https://user-images.githubusercontent.com/841551/119437249-51a91180-bd50-11eb-9837-475d6eaf3397.png)
   
   So I think what we need is adding an `Z` command when rendering `rect` command in the SVG renderer https://github.com/ecomfe/zrender/blob/da94b645863f50d6975c4c56e3c97f08bd5edd4f/src/svg/graphic.ts#L229


-- 
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 #15023: Grid border not closed at left-top corner (no z in SVG path)

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


   I'm not sure why [this commit](https://github.com/ecomfe/zrender/commit/da94b645863f50d6975c4c56e3c97f08bd5edd4f#diff-e3a572e684749bd567f01d5a55350564cf17a3c73a38980f3e626568f72ee6a2L67) https://github.com/ecomfe/zrender/commit/da94b645863f50d6975c4c56e3c97f08bd5edd4f removed `ctx.closePath()`. @pissang 


-- 
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] pissang edited a comment on issue #15023: Grid border not closed at left-top corner (no z in SVG path)

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15023:
URL: https://github.com/apache/echarts/issues/15023#issuecomment-847510964


   @plainheart I thought the first point and the last point has been connected in the `roundRect.ts` helper so there is no need to do `closePath` again, which is an extra cost in the case that drawing lots of rect(like in benchmark.html). But it seems to be a mistake in this case.
   
   Also, only the SVG renderer that drawing a rectangle without border-radius will have this issue. Because canvas renderer will use `ctx.rect` command, which is closed underlying automatically. And drawing rectangle with `border-radius` also has no issue because there is an `arc` command connecting the first point and last point, which is like:
   
   ![image](https://user-images.githubusercontent.com/841551/119437249-51a91180-bd50-11eb-9837-475d6eaf3397.png)
   
   So I think what we need is adding an `Z` command when rendering `rect` command in the SVG renderer https://github.com/ecomfe/zrender/blob/9780bd81795010b7e99f77b907c7530552184942/src/svg/graphic.ts#L239
   It can keep both performance in the canvas and correctness in the svg


-- 
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] pissang edited a comment on issue #15023: Grid border not closed at left-top corner (no z in SVG path)

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15023:
URL: https://github.com/apache/echarts/issues/15023#issuecomment-847510964


   @plainheart I thought the first point and the last point has been connected in the `roundRect.ts` helper so there is no need to do `closePath` again, which is an extra cost in the case that drawing lots of rect(like in benchmark.html). But it seems to be a mistake in this case.
   
   Also, only the SVG renderer that drawing a rectangle without border-radius will have this issue. Because canvas renderer will use `ctx.rect` command, which is closed underlying automatically. And drawing rectangle with `border-radius` also has no issue because there is an `arc` command connecting the first point and last point, which is like:
   
   ![image](https://user-images.githubusercontent.com/841551/119437249-51a91180-bd50-11eb-9837-475d6eaf3397.png)
   
   So I think what we need is adding an `Z` command when rendering `rect` command in the SVG renderer https://github.com/ecomfe/zrender/blob/da94b645863f50d6975c4c56e3c97f08bd5edd4f/src/svg/graphic.ts#L229
   It can keep both performance in the canvas and correctness in the svg


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