Skip to content

[Bug] When dataZoom both set minValueSpan and maxValueSpan, zoom in to max, work wrong #18919

Closed as not planned

Description

@kitee0325

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=scatter-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMgL4A0asAnjvkUmRQCYCGYzAWsMALZEDaFdKnQjY3CNABqzADYBXAKYBlEM2hEATOVHpuzDNPnLV62ABZBsBqOE6wlEAqIByCXgiMFz7TvFTZiipqmj6iegYBxsHmlsQUALo-eAoAThAKhLACNpboeJTcAEbAMkoQAF5OsBoADKEiLGz8uSJ8AIw1AHR1sAAc3WaJLeh8_TUA7KSwAGydAJwArEM6rW0AzN1T450LvcsrWXPdC1P9vW37K-1tm32da2uXOu1mt9vT00-i7RtmU7PnL6rLo9WYPIEjNqvHr9OaferfNoaHb_Tq9DQQw6dNonWDbDEI1Y3XH4zF8DY1NZTV4aR6EyHIrR4tF04ZZZE1JmvMzjMk3Gq4jbg-lZaG415wsmzSlbToaQYi9oc1EaeFspW3M4K9XbGq9KYLNEE9WGzkGzrTPYtIH2RwuPAAY1YYFSzliCRQxAA3EA

Steps to Reproduce

zoom to minSpan

Current Behavior

when zoom to minSpan, continue zoom, trigger translation

e.g
maxValueSpan:4,
minValueSpan:2,
zoomCenter:[2,any]

axisRange:[0,4] => zoom in => axisRange: [1,3] => zoom in => axisRange:[2,4] ??

Expected Behavior

when zoom to minSpan, continue zoom, nothing happen OR just translate little because of zoom center
maxValueSpan:4,
minValueSpan:2,
zoomCenter:[2,any]

axisRange:[0,4] => zoom in => axisRange: [1,3] => zoom in => axisRange:[1,3]

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Activity

  1. added
    en
    pending
    on Jul 21, 2023
  2. changed the title [-][Bug] When dataZoom both set minValueSpan and maxValueSpan, zoom to max, work wrong[/-] [+][Bug] When dataZoom both set minValueSpan and maxValueSpan, zoom in to max, work wrong[/+] on Jul 21, 2023
  3. helgasoft commented on Aug 5, 2023

    @helgasoft

    minValueSpan is about zoom window size and it correctly does that in your example: min window size is 2 units, max window size is 4 units.
    Where is the problem?

  4. kitee0325 commented on Aug 6, 2023

    @kitee0325
    Author

    minValueSpan is about zoom window size and it correctly does that in your example: min window size is 2 units, max window size is 4 units. Where is the problem?

    when window size is 2, continue zoom in, expect nothing happen, actually trigger translate.
    It seems a little hard to accept.

    I guess because the source code does not deal with the minimum scaling, still adjust the position based on the new zoom center, which is no problem in the algorithm, but it looks strange in the interaction

  5. helgasoft commented on Aug 6, 2023

    @helgasoft

    ok, I see and agree, this is a bug on mouse scroll.
    Scrolling the mouse should perform only zoom-in and zoom-out, not move (translate) the zoom window.
    Mouse click + drag should be the only way to shift the zoom window.
    The current mix of the two is confusing to users.

  6. github-actions commented on Aug 5, 2025

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

  7. added
    stale
    on Aug 5, 2025
  8. github-actions commented on Aug 13, 2025

    @github-actions
    Contributor

    This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

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

    bugenpendingstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions