Skip to content

Commit

Permalink
Address feedback for #179
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanzou committed Nov 7, 2024
1 parent 9dc2182 commit 72e162f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plot/plaxis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ void wxPLTimeAxis::RecalculateTicksAndLabel() {

// m_tickList.push_back(TickData(time + daysVisibleInMonth * 24.0f, wxEmptyString, TickData::LARGE));
m_tickList.push_back(TickData(time + daysVisibleInMonth * 24.0f + m_min_offset * 8760, wxEmptyString, TickData::LARGE));
int endMonthHours = time + daysVisibleInMonth * 24.0f; //00:00 on first of next month.
int endMonthHours = time + m_min_offset * 8760 + daysVisibleInMonth * 24.0f; //00:00 on first of next month.

if (daysVisibleInMonth >= 7) {
//Label the month if it has more than seven days visible.
Expand Down Expand Up @@ -830,17 +830,17 @@ void wxPLTimeAxis::RecalculateTicksAndLabel() {

time += daysVisibleInMonth * 24.0f;
timeKeeper2.Add(wxTimeSpan::Minutes(daysVisibleInMonth * 24.0f * 60.0f));
// while (time < m_max && timeKeeper2.GetMonth() == timeKeeper.GetMonth()) {
while (time < m_max_scaled && timeKeeper2.GetMonth() == timeKeeper.GetMonth()) {
while (time < m_max && timeKeeper2.GetMonth() == timeKeeper.GetMonth()) {
// while (time < m_max_scaled && timeKeeper2.GetMonth() == timeKeeper.GetMonth()) {
daysVisibleInMonth += 1;
timeKeeper2.Add(wxTimeSpan::Day());
time += 24;
}

if (daysVisibleInMonth >= 7) {
//Label the month if it has more than seven days visible.
// m_tickList.push_back(TickData(time - (daysVisibleInMonth * 24.0f / 2.0f), timeKeeper.Format("%b"), TickData::NONE));
m_tickList.push_back(TickData(time - (daysVisibleInMonth * 24.0f / 2.0f) + m_min_offset * 8760, timeKeeper.Format("%b"), TickData::NONE));
m_tickList.push_back(TickData(time - (daysVisibleInMonth * 24.0f / 2.0f), timeKeeper.Format("%b"), TickData::NONE));
// m_tickList.push_back(TickData(time - (daysVisibleInMonth * 24.0f / 2.0f) + m_min_offset * 8760, timeKeeper.Format("%b third"), TickData::NONE));
}
}

Expand Down

0 comments on commit 72e162f

Please sign in to comment.