Skip to content

xaxis one hour difference #841

@scg-src

Description

@scg-src

https://codepen.io/haroflow/pen/ymjoMM

Explanation

What is the behavior you expect?
Correct position of tick and label
Showing midnight label on x-axis

What is happening instead?
Wrong tick position at midnight, one hour difference.

What error message are you getting?
None.

Suggestion - this works for me

diff --git a/src/modules/TimeScale.js b/src/modules/TimeScale.js
index 68c7654..93a124f 100644
--- a/src/modules/TimeScale.js
+++ b/src/modules/TimeScale.js
@@ -591,10 +591,7 @@ class TimeScale {
       }
 
       let year = currentYear + Math.floor(month / 12) + yrCounter
-      pos =
-        hour === 0 && i === 0
-          ? remainingMins * minutesWidthOnXAxis
-          : 60 * minutesWidthOnXAxis + pos
+      pos =  60 * minutesWidthOnXAxis + pos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions