Skip to content

Commit

Permalink
fix missing first label on x-axis bar graph - fixes #1730
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed May 9, 2021
1 parent a6f1f58 commit 456ce8c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/TimeScale.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,18 @@ class TimeScale {
unit = 'month'
date = firstVal.minDate
numberOfDays++
} else if (
firstVal.minDate !== 1 &&
firstVal.minHour === 0 &&
firstVal.minMinute === 0
) {
// fixes apexcharts/apexcharts.js/issues/1730
firstTickPosition = 0
firstTickValue = firstVal.minDate
date = firstTickValue
val = firstTickValue
// in case it's the last date of month, we need to check it
month = changeMonth(date, currentMonth, currentYear)
}

// push the first tick in the array
Expand Down

0 comments on commit 456ce8c

Please sign in to comment.