apache / echarts

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

[Bug] Bar chart with time x-axis: labels not centered #17846

Open uykusuz opened 2 years ago

uykusuz commented 2 years ago

Version

5.4.0

Link to Minimal Reproduction

https://jsfiddle.net/uykusuz/2zrx1pnj/3/

Steps to Reproduce

  1. open the link to the fiddle
  2. look at the x-axis labels

Current Behavior

the labels for each bar are not centered below their corresponding bars

Expected Behavior

the labels are centered below their corresponding bars

Environment

- OS: arch linux
- Browser: chrome  106.0.5249.119 (Official Build) (64-bit)
- Framework: plain JS

Any additional comments?

I tried axisLabel.align, but that doesn't work. I couldn't find another option that would make sense here.

plh97 commented 2 years ago

https://jsfiddle.net/do63ytvz/24/ you should use the category replace the time

uykusuz commented 2 years ago

But I want the features of the time axis type. In particular, the uniform distribution of the axis values.

-------- Original Message -------- On Oct 28, 2022, 16:59, plh wrote:

https://jsfiddle.net/do63ytvz/24/ you should use the category replace the time

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

leunga1000 commented 3 months ago
     axisTick: {
        alignWithLabel: true
      },

from https://apache.github.io/echarts-handbook/en/concepts/axis/#example worked for me!