镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug] DataZoom position bugs when series data only one #21245

Closed

Description

@hks2002

Version

6.0.0

Link to Minimal Reproduction

https://echarts.apache.org/examples

Steps to Reproduce

past this option in the samples page:

option = {
  xAxis: {
    type: 'time',
    data: ['2025-01-01']
  },
  yAxis: {
    type: 'value'
  },
  dataZoom:[{
        type: 'slider',
        height: 15,
        bottom: '5px',
        start: 0,
        end: 100,
        xAxisIndex: [0]
      }],
  series: [
    {
      data: [150],
      type: 'line'
    }
  ]
};

Current Behavior

Image Image

Expected Behavior

Image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Activity

  1. added
    enThis issue is in English
    pendingWe are not sure about whether this is a bug/new feature.
    on Sep 5, 2025
  2. Justin-ZS commented on Sep 5, 2025

    @Justin-ZS
    Contributor

    fixed in #21196 ?

  3. hks2002 commented on Oct 25, 2025

    @hks2002
    Author

    fixed in #21196 ?
    not fixed yet

  4. unaipme commented on Nov 5, 2025

    @unaipme

    Hi! Had something very similar happen to me. Here's a minimal reproduction. In this case the datazoom is shown misplaced but at least it is shown in the bottom, where I configured it to be.

    I found out about two weird cases where this bug doesn't happen:

    1. If you uncomment the additional data point I left on the reproduction, the data zoom goes back to its original position. However, if you change the time on the second data point to be the same as in the first data point, the datazoom again gets misplaced.
    2. If you add another series before the one causing the issue, even if it does not have any data, the datazoom works. For example: { type: 'line', data: [] }.

    Hope this sheds a light on the original issue :)

  5. takaebato commented on May 3, 2026

    @takaebato

    I confirmed this no longer reproduces on master.
    It seems to be fixed by #21196 which is not included in current 6.0.0 yet, so it still reproduces in the current online examples / released build.

  6. hks2002 commented on Jul 28, 2026

    @hks2002
    Author

    in v6.1.0 #21196 merged.

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

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions