apache / echarts

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

使用dataZoom对横坐标时间轴进行缩放的时候,缩放到最小值不再缩放的时候会触发时间轴移动,图表不动的情况 #19205

Open FN-G opened 1 year ago

FN-G commented 1 year ago

Version

"echarts": "^5.0.0",

Link to Minimal Reproduction

使用dataZoom对横坐标时间轴进行缩放的时候,缩放到最小值不再缩放的时候会触发时间轴移动,图表不动的情况

Steps to Reproduce

import * as echarts from 'echarts' // import { max } from '_moment@2.29.1@moment' /**

Current Behavior

我时间轴是当天的24小时,我有一段人员上班时间是当天的00:00:00 - 16:20:48,我鼠标滚轮事件对dataZoom对横坐标进行缩放的时候,缩放到最小的时候时间轴还在往左滑动,但是我的标记的区间还是停留在那里不动,就导致我这个标记刚开始是00:00:00 - 16:20:48,随着到最后我的这个标记不动时间轴动,这个区间就可能变成16:20:48之后的任何时间比如23:00:00 这是没有缩放的时候,我这个人员的结束时间大概是在16点多的时候 image 这是缩放到最后,就是刚开始的时候这个柱子的长度会随着时间变化,缩到最小缩放值之后,就开始横坐标时间轴一直向左移动,但是这个柱子不再变化,就导致这个柱子的实际时间跟看到的是对不上的 image

Expected Behavior

当缩放到最小不能再缩放的时候继续鼠标滚轮事件不要移动时间轴

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] commented 1 year ago

I'm sorry to close this issue for it lacks the necessary title. Please provide a descriptive and as concise as possible title to describe your problems or requests and then the maintainers or I will reopen this issue.

Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.

A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.

Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.

echarts-bot[bot] commented 1 year ago

@FN-G It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** When using dataZoom to zoom the abscissa timeline, when zooming to the minimum value and no longer zooming, the timeline will be triggered to move and the chart will not move. **BODY** ### Version "echarts": "^5.0.0", ### Link to Minimal Reproduction When using dataZoom to zoom the abscissa timeline, when zooming to the minimum value and no longer zooming, the timeline will be triggered to move and the chart will not move. ### Steps to Reproduce dataZoom: [ { type: 'inside', filterMode: 'none', show: true, realtime: true, start: 0, height: 16, end: 100, bottom: 10, moveOnMouseMove: false, moveOnMouseWheel: false, zoomOnMouseWheel: true, minSpan: 2 } ], ### Current Behavior My timeline is the 24 hours of the day. I have a period of time when people work from 00:00:00 to 16:20:48 of the day. When my mouse wheel event zooms the abscissa of dataZoom, the time is the smallest when zooming. The axis is still sliding to the left, but the range of my mark still stays there, which causes my mark to start from 00:00:00 - 16:20:48, and then to the end my mark does not move. If the timeline moves, this interval may become any time after 16:20:48, such as 23:00:00 This is when there is no zoom. The end time of my staff is about 16 o'clock. ![image](https://github.com/apache/echarts/assets/44664812/046e0708-eae5-4584-be35-c028b944f30f) This is zooming to the end, that is, at the beginning, the length of the column will change over time. After zooming to the minimum zoom value, the abscissa time axis will start to move to the left, but the column will not change, resulting in this column The actual time does not match what you see. ![image](https://github.com/apache/echarts/assets/44664812/ec90fc65-254d-4b8b-83f8-6d6e0560c372) ### Expected Behavior When zooming to the minimum and no longer zooming, continue the mouse wheel event and do not move the timeline. ### Environment ```markdown - OS: -Browser: - Framework: ``` ### Any additional comments? _No response_