Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar chart with datetime xaxis displays wrong labels #4837

Open
cmeelker opened this issue Nov 28, 2024 · 0 comments
Open

Bar chart with datetime xaxis displays wrong labels #4837

cmeelker opened this issue Nov 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cmeelker
Copy link

Description

When using the datetime type for the xaxis of a bar chart, the labels behave weird if there are only 2 or 3 dates provided as categories.

Steps to Reproduce

 var options = {
    series: [{
      name: 'PRODUCT A',
      data: [44, 55, 41]
    }],
    chart: {
      type: 'bar',
    },
    xaxis: {
      type: 'datetime',
      categories: ['01/01/2011 GMT', '01/02/2011 GMT', '01/03/2011 GMT'],
    },
};

Expected Behavior

Display 3 labels, one for each category/day.

Actual Behavior

  • Displays more labels than the total amount of categories.
  • Displays times where dates are expected.
  • The labels are not positioned correctly below the bars.

Screenshots

image

Reproduction Link

https://jsfiddle.net/c7ah2qr6/1/

@cmeelker cmeelker added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant