Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph edge's lines are sometimes rounded to wrong position by subPixelOptmize #14093

Open
buhichan opened this issue Jan 22, 2021 · 2 comments
Open
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community
Milestone

Comments

@buhichan
Copy link

Version

5.0.1

Reproduction link

https://codesandbox.io/s/young-cache-2jkt8?file=/src/App.tsx

Steps to reproduce

See the codesandbox

What is expected?

graph edge positions should be corrent.

What is actually happening?

If you clicked the reset button, sometimes one (sometimes more than one) of the edge has a wrong position, it will become y1 === y2 or x1 === x2 when it shouldn't.


it's caused by subPixelOptimize, if disable subPixelOptimize in line, it works. It seems the "x1, x2, y1, y2" passed to subPixelOptimize are not the line's true pixel position but a small fraction number like 0.05, but style.lineWidth is counted by pixel, which maybe much larger like 3, causeing this issue.

@echarts-bot
Copy link

echarts-bot bot commented Jan 22, 2021

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 and chart option 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.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Jan 22, 2021
buhichan added a commit to buhichan/zrender that referenced this issue Jan 22, 2021
buhichan added a commit to buhichan/zrender that referenced this issue Jan 22, 2021
@pissang pissang added this to the 5.2.0 milestone Jan 22, 2021
@pissang pissang added the difficulty: easy Issues that can be fixed more easily than the average. label May 6, 2021
@echarts-bot
Copy link

echarts-bot bot commented May 6, 2021

This issue is labeled with difficulty: easy.
@buhichan 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 if you'd like to give a try. 🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community
Projects
None yet
Development

No branches or pull requests

2 participants