You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/15 10:54:00 UTC

[GitHub] [echarts] jiawulin001 commented on issue #16746: [Bug] Data plotted at false position after zooming with filterMode "none"

jiawulin001 commented on issue #16746:
URL: https://github.com/apache/echarts/issues/16746#issuecomment-1100036918

   #### #16852 is also caused by this bug.
   ### This bug is caused by two logic problems.
   
   #### The first one is here:
   When Echarts tries to determine the location of each series 
   https://github.com/apache/echarts/blob/a5257e38ad7776c766879c83854b1faa2771a454/src/coord/Axis.ts#L122-L133
   We enters:
   https://github.com/apache/echarts/blob/a5257e38ad7776c766879c83854b1faa2771a454/src/scale/helper.ts#L129-L132
   Here we have `extent = [320, 320]` which means there's only one category to be shown.
   However a TOO simple judgement is used here and make position of all three categories of line 0.5, so they all locate at the middle of the chart after zooming to one only category.
   
   #### The second one is here:
   https://github.com/apache/echarts/blob/a5257e38ad7776c766879c83854b1faa2771a454/src/util/number.ts#L47-L65
   We have r1 = r0 = 320 here (come from `extent = [320, 320]`) so subRange is 0 and won't distinguish categories at all.
   
   **Submitting a PR to solve this.**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org