echarts icon indicating copy to clipboard operation
echarts copied to clipboard

当x轴为时间轴时X轴配置项interval设置无效[Bug]

Open hanqicheng opened this issue 2 years ago • 4 comments

Version

5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

let data = [ [ 1650511428000, 22 ], [ 1650511438000, 22 ], [ 1650511458000, 22 ] ] option = { "tooltip": { "trigger": "axis", "axisPointer": { "type": "cross" } }, "xAxis": { "type": "time", "name": "时间", "interval": 3600000,//60分钟 "min": 1650506400000, "max": 1650513600000, "axisLabel": {} }, "grid": { "top": 40, "left": 60, "right": 40, "bottom": 40 }, "yAxis": { "type": "value", "name": "温度℃", "min": 0, "interval": 33, "axisLabel": { "show": true }, "max": 528 }, "series": [ { "name": "温度", "data":data , "type": "line", "smooth": true, "showSymbol": false } ] };

Current Behavior

当x轴type为time时interval配置项无效,无法自定义设置x轴间隔 QQ截图20220421173614

Expected Behavior

当x轴type为time时,设置interval为3600000时X轴间隔应该为1小时,而不应该是其他大小间隔

Environment

- OS:windown 10
- Browser:Chrome 100.0.4896.88
- Framework: Vue@2

Any additional comments?

当我将echart版本退回到4.9.0时能正常应用

hanqicheng avatar Apr 21 '22 09:04 hanqicheng

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] avatar Apr 21 '22 09:04 echarts-bot[bot]

@QC-GET 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

X-axis configuration item interval setting is invalid when the x-axis is the timeline [Bug]

echarts-bot[bot] avatar Apr 21 '22 09:04 echarts-bot[bot]

也许你可以搭配 minInterval 与 maxInterval 来设置一个固定的间隔,不过 interval 似乎确实不生效了,使用的是根据 minInterval 与 maxInterval 计算的结果来划分 tick,不晓得是文档没更新还是一个 bug(

linghaoSu avatar May 02 '22 00:05 linghaoSu

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.

github-actions[bot] avatar May 01 '24 21:05 github-actions[bot]

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!

github-actions[bot] avatar May 08 '24 21:05 github-actions[bot]

感觉像个bug 我也碰到过,只能降版本使用

dlkybc avatar Jul 03 '24 03:07 dlkybc

看起来像个bug我也很简单,只能降级版本使用

确实是bug,有开发人员说会再后续版本中改正,不知道现在改正了没有

hanqicheng avatar Jul 03 '24 04:07 hanqicheng