fix(scale): correct bar height when zoomed with dataZoom filterMode i… by akashsonune · Pull Request #21524 · apache/echarts · GitHub
Skip to content

fix(scale): correct bar height when zoomed with dataZoom filterMode i…#21524

Open
akashsonune wants to merge 2 commits intoapache:masterfrom
akashsonune:fix/issue-19666-bar-datazoom-height
Open

fix(scale): correct bar height when zoomed with dataZoom filterMode i…#21524
akashsonune wants to merge 2 commits intoapache:masterfrom
akashsonune:fix/issue-19666-bar-datazoom-height

Conversation

@akashsonune
Copy link
Copy Markdown
Contributor

…s none

Fixes #19666

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fixed issues

Details

Before: What was the problem?

After: How does it behave after the fixing?

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Merging options

  • Please squash the commits into a single one when merging.

Other information

@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Mar 2, 2026

@akashsonune akashsonune force-pushed the fix/issue-19666-bar-datazoom-height branch from eec6f72 to b7f7313 Compare March 2, 2026 18:05
Comment thread src/scale/helper.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure val !== extent[0] is expected, please also help test the cases for markPoints to display correctly for single data.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ovilia I added tests for markpoint. also I feel the condition val !== extent[0] is needed becuase When the range collapses to a single point, only the value that matches that point should be drawn. Everything else should be ignored (NaN).

Without this check, ALL bars try to draw at the same position, causing the visual bug where zoomed single bar looks like it has value of the highest bar in the series

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Incorrect display of Series bars on zoom in

2 participants