echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] dataZoom detail shape is not the same as data with value axis

Open Ovilia opened this issue 3 years ago • 5 comments

Version

5.2.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AG4CGANgK5W0kC-ANCeTnxFUpMpRqwGLdp3S8SeKgCcIVQrADaJdCNGwAJozCMiWvaQ0BGAEw9YAZgC6fc-isBWO-4AMz7Xo1rbzt7XxdXK29g2B9Hf3Q_cwpqOmYIaA5_LhJEgyNGAC1gYABbYX88YyUwADVpCSDuFC4AbiA

Steps to Reproduce

option = {
  xAxis: {
    type: 'value'
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [
        [12, 3],
        [15, 50],
        [20, 30],
        [100, 50]
      ],
      type: 'line'
    }
  ],
  dataZoom: {
    startValue: 20
  }
};
image

Current Behavior

The detail view in the dataZoom is not the same as the data in range. You can see that the max value is still in the detail view of the dataZoom (wrong) but not in the chart visible area (correct).

Expected Behavior

The detail view should be the same as the chart area.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Similar problems exists when data is not in the ascending order in xAxis (e.g., [100, 10], [50, 20]).

Ovilia avatar Jun 01 '22 08:06 Ovilia

It seems that the detail view of dataZoom is evenly divided by 4, which is equal to series.data.length.

image

tyn1998 avatar Jun 01 '22 08:06 tyn1998

I'm fixing this. :) @tyn1998

Ovilia avatar Jun 01 '22 09:06 Ovilia

I'm fixing this. :)

@Ovilia, does this issue partially overlap my old issue 17122?

MrCatEsq avatar Jun 24 '22 22:06 MrCatEsq

Any update on this?

peer-kkang avatar Aug 22 '23 20:08 peer-kkang

Any updates on this? I'm facing the same issue

RafaelFaria98 avatar Feb 19 '24 14:02 RafaelFaria98