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

Display error Date when set labels for xaxis #4763

Open
cuobiezi opened this issue Oct 15, 2024 · 10 comments
Open

Display error Date when set labels for xaxis #4763

cuobiezi opened this issue Oct 15, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@cuobiezi
Copy link
Contributor

cuobiezi commented Oct 15, 2024

Description

Steps to Reproduce

  1. Config chart type as 'line'. and xaxis type is 'datetime'
  2. Config max as 1714881301463, min as 1714838101463, tickAmount as 10.
  3. Display xaixs time start close to next day (eg: Sat May 04 2024 23:55:01).
  4. Config labels as
labels: {
      datetimeUTC: false,
      formatter: undefined,
      datetimeFormatter: {
        year: 'yyyy',
        month: 'MMM yyyy',
        day: 'dd MMM',
        hour: 'HH:mm'
      }
    }

Reproduce Env

  • OS version: Edition Windows 10 Enterprise LTSC
  • Chrome version: 129.0.6668.70 (Official Build) (64-bit)
  • Chrome version: 87.0.4280.141 (Official Build) (64-bit)

I can reproduce both of above chrome version .

Expected Behavior

Display correct Date 4 May at the left of xaxis label .

Actual Behavior

Display incorrect Date 24 May the the left of xaxis label.

Screenshots

image
image

Reproduction Link

https://codepen.io/cuobiezi/pen/MWNpqJr

@cuobiezi cuobiezi added the bug Something isn't working label Oct 15, 2024
@brianlagunas
Copy link
Member

brianlagunas commented Oct 15, 2024

your reproduction link does not reproduce the issue. Nothing is being rendered on the chart as it seems the data is not correct. Please verify the reproduction code.

@cuobiezi
Copy link
Contributor Author

cuobiezi commented Oct 16, 2024

your reproduction link does not reproduce the issue. Nothing is being rendered on the chart as it seems the data is not correct. Please verify the reproduction code.

Updated data.
Actually, My issue didn't relate to data , It is xaxis label display incorrect. Max Time 1714881301463 is 5 May ,Min time 1714838101463 is 4 May. But the xaxis label display start from 24 May, not in the correct range of 4 May - 5 May

@brianlagunas
Copy link
Member

I am not seeing the issue you are describing. Can you provide a screenshot of what you are seeing?

@cuobiezi
Copy link
Contributor Author

cuobiezi commented Oct 17, 2024

I am not seeing the issue you are describing. Can you provide a screenshot of what you are seeing?

Uploaded to description, Thanks.

@junedchhipa
Copy link
Contributor

@cuobiezi What browser are you using? I am unable to see what's in the screenshot.

@cuobiezi
Copy link
Contributor Author

@cuobiezi What browser are you using? I am unable to see what's in the screenshot.

@junedchhipa Updated reproduce env in the Description , Thanks.

@brianlagunas
Copy link
Member

This is what the code pen shows me on Windows and Chrome version 129.0.6668.101

image

@cuobiezi
Copy link
Contributor Author

This is what the code pen shows me on Windows and Chrome version 129.0.6668.101

image

Your screen xaxis start from 4 May morning. The reproduce case xaixs min config field 1714838101463 the xaixs should be from ** 4 May ** start evening.
image

@cuobiezi
Copy link
Contributor Author

@cuobiezi What browser are you using? I am unable to see what's in the screenshot.

that because time zone issue, Please refer step 3 in description

@cuobiezi
Copy link
Contributor Author

This is what the code pen shows me on Windows and Chrome version 129.0.6668.101
image

Oh , I got it , we are difference time zone, LOL. The reproduce key step is set the xaixs start time close to next day . like (Sat May 04 2024 23:55:01)

cuobiezi added a commit to cuobiezi/apexcharts.js that referenced this issue Nov 9, 2024
junedchhipa added a commit that referenced this issue Nov 10, 2024
#4763 bugfix Display error Date when set xaxis frist label close to next day.
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

5 participants
@brianlagunas @junedchhipa @cuobiezi and others