Skip to content

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

Closed

Description

@sirviot

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.

Activity

  1. added
    en
    pending
    on Nov 1, 2022
  2. added
    missing-demo
    on Nov 7, 2022
  3. echarts-bot commented on Nov 7, 2022

    @echarts-bot

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

  4. sirviot commented on Nov 8, 2022

    @sirviot
    Author

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

  5. Skuperday commented on Jan 20, 2023

    @Skuperday

    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];
    }

  6. B-o-s-s-e commented on Feb 8, 2023

    @B-o-s-s-e

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

  7. sirviot commented on Feb 14, 2023

    @sirviot
    Author

    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.

  8. gowthamicp commented on Mar 1, 2023

    @gowthamicp

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

    image

    Barchart_Overflow_Issue

  9. gowthamicp commented on Mar 13, 2023

    @gowthamicp

    Any update on this?

  10. sirviot commented on Mar 20, 2023

    @sirviot
    Author

    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.

  11. gitter-me commented on May 23, 2023

    @gitter-me

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

  12. sirviot commented on Dec 12, 2023

    @sirviot
    Author

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

  13. Skuperday commented on Jul 9, 2024

    @Skuperday

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

  14. akashsonune commented on Mar 2, 2026

    @akashsonune
    Contributor

    I think after the PR- #21511 This issue should be fixed. can we close?

  15. added a commit that references this issue on Mar 15, 2026
    fe932a2
  16. 100pah commented on May 14, 2026

    @100pah
    Member

    Fix in v6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenmissing-demopending

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions