apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.69k stars 19.62k forks source link

fix(scale): #20265 when dataZomm.filterMode is “empty” or ‘none’, the line graph is scaled to only one category, it is not filtered correctly #20495

Open linlang171 opened 1 week ago

linlang171 commented 1 week ago

Brief Information

This pull request is in the type of:

What does this PR do?

fix bug #20265 issue

Fixed issues

20265 : datazoom.filterMode设为'empty'时line图在缩放至只剩一条数据时所有数据都依旧会渲然,未依照empty的规则进行筛选。

Details

Before: What was the problem?

when dataZomm.filterMode is “empty” or ‘none’, the line graph is scaled to only one category, it is not filtered correctly

image

After: How does it behave after the fixing?

The data is correctly filtered. And The bug is caused by calling the normalize method when calculating rendering values. When extra [1]==extra [0], it does not consider the possibility of NaN and returns 0.5 directly

8182f6148467cd28dbf5856e39d95bb

Document Info

One of the following should be checked.

Misc

ZRender Changes

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

Other information

echarts-bot[bot] commented 1 week ago

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.

echarts-bot[bot] commented 1 week ago

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

linlang171 commented 3 days ago

This issue is very troubling for my project。 Can someone review it? Thanks!