Skip to content

Commit

Permalink
fix #3466; correct date when 1st value in x-axis is last day of month
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Dec 10, 2024
1 parent 8fd74b3 commit d7e0fe1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/TimeScale.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ class TimeScale {
val = firstTickValue
// in case it's the last date of month, we need to check it
month = changeMonth(date, currentMonth, currentYear)

if (val !== 1) {
unit = 'day'
}
}

// push the first tick in the array
Expand Down Expand Up @@ -635,7 +639,7 @@ class TimeScale {
hour = 0
date += 1
unit = 'day'
// Unit changed to day , Value should align unit
// Unit changed to day , Value should align unit
firstTickValue = date
}

Expand Down

0 comments on commit d7e0fe1

Please sign in to comment.