echarts [Bug] X-Axis labels are too close to each other during month change on weekly interval

ux6nzvsh  于 3个月前  发布在  Echarts
关注(0)|答案(2)|浏览(75)

Version

5.3.1

https://codesandbox.io/s/dynamic-data-time-axis-forked-sdyeeq?file=/index.js

Steps to Reproduce

  1. Choose Dynamic Data + Time Axis- example from echarts: https://echarts.apache.org/examples/en/editor.html?c=dynamic-data2
  2. Add
dataZoom: {
    start: 95,
    type: "inside",
    throttle: 50
  },
  1. Add
axisLabel: {
      formatter: {
        year: "{yyyy}",
        month: "{dd}-{MMM}",
        day: "{dd}-{MMM}",
        hour: "{HH}:{mm}"
      }
   },

Current Behavior

As displayed below, the interval between each tick is supposed to be one week, but during every month or year change, this resets, making the last tick in the previous month and the new tick in a new month too close to each other.

Expected Behavior

The x-axis should ignore month changes and keep the same interval between ticks no matter the zoom level.

No response

2uluyalo

2uluyalo1#

Time axis labels should be enhanced.

o2gm4chl

o2gm4chl2#

Seems to be the same problem as #17023 , and I agree that time axis might need to be re-designed.

相关问题