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

Bar charts not clipped when using filterMode: 'none' #17858

Open
sirviot opened this issue Nov 1, 2022 · 11 comments
Open

Bar charts not clipped when using filterMode: 'none' #17858

sirviot opened this issue Nov 1, 2022 · 11 comments
Labels
bug en This issue is in English missing-demo The author should provide a demo. pending We are not sure about whether this is a bug/new feature.

Comments

@sirviot
Copy link

sirviot commented Nov 1, 2022

Version

5.3.3

Link to Minimal Reproduction

https://jsfiddle.net/961uvr8z/1/

The bar chart overflow is visible and even more so when scrolling (see attached image).
Screenshot 2022-11-08 at 9 39 09

Steps to Reproduce

From previous issue:

I saw the very same title issue before, I thought the problem was solved, but when I tried it, there was actually no.

#10646

Current Behavior

Soe bar chart bars are drawn outside of the chart area.

Expected Behavior

Bars outside of the chart area should not be drawn.

Any additional comments?

Link to previous issue that was closed due to inactivity #12720.

@sirviot sirviot added the bug label Nov 1, 2022
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Nov 1, 2022
@Ovilia Ovilia added the missing-demo The author should provide a demo. label Nov 7, 2022
@echarts-bot
Copy link

echarts-bot bot commented Nov 7, 2022

@sirviot Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

@sirviot
Copy link
Author

sirviot commented Nov 8, 2022

Linked to a JSFiddle and attached an image to visualize the problem.

@Skuperday
Copy link

Hello there! I ran into a same trouble a couple of days ago and found a solution how to use a bar chart and line chart so that the filtering does not cut off the data. This solved my problem with dataZoom
All that is needed is to change the weakFilter behavior logic in the sources. For a line chart, using filters causes problems when 1-2 points remain, but @cfwang123 was able to find a solution to the problem of filter behavior, I suggest using the old filter for the bar chart, and in all other situations, the modified filter @cfwang123
from:
var thisLeftOut = value < valueWindow[0];
var thisRightOut = value > valueWindow[1];
to:
if(seriesModel.subType === 'bar') {
var thisLeftOut = value < valueWindow[0];
var thisRightOut = value > valueWindow[1];
} else {
var thisLeftOut = value < valueWindow[0] && seriesData.get(dataDims[i], dataIndex+1) < valueWindow[0];
var thisRightOut = value > valueWindow[1] && seriesData.get(dataDims[i], dataIndex-1) > valueWindow[1];
}

@B-o-s-s-e
Copy link

Any update on this? I have exactly the same problem and i am a bit lost. Is there any workaround to solve this?

@sirviot
Copy link
Author

sirviot commented Feb 14, 2023

At least the lables should be updated, but I have no access to them. The issue is not missing a demo anymore and this is definitelty a bug and not a new feature request.

@gowthamicp
Copy link

@Ovilia
Bar chart not clipped when filterMode none is selected .Below is the code to replicate the issue :

image

Barchart_Overflow_Issue

@gowthamicp
Copy link

Any update on this?

@sirviot
Copy link
Author

sirviot commented Mar 20, 2023

Nothing from my end. I'm hoping someone someday will have time to solve the issue. The issue still has the "pending" label, although it shouldn't be necessary.

@gitter-me
Copy link

I can confirm the exact issue.
This makes zooming problematic if a bar and line series are in one chart.

@sirviot
Copy link
Author

sirviot commented Dec 12, 2023

Is there any possibility to have the issue fixed in some near future? Also, the issue still has the "pending" label.

@Skuperday
Copy link

fix this behavior too under this pr: #18202, please help me make it more noticeable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English missing-demo The author should provide a demo. pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

6 participants