Commit 6eb8d6ec authored by Vincent Pelletier's avatar Vincent Pelletier

halfhour table period is too close to halfday (4 columns until rescale).

Replace with quarterhour, do not change plot period.
parent df13912c
......@@ -964,9 +964,9 @@ def _asMinuteString(timestamp):
day, month, year = dt_date.split('/')
return '%s/%02i/%s %s:%s' % (year, MONTH_VALUE_DICT[month], day, hour, minute)
def _asHalfHourString(timestamp):
def _asQuarterHourString(timestamp):
prefix, minute = timestamp.rsplit(':', 1)
return '%s:%02i' % (prefix, int(minute) // 30 * 30)
return '%s:%02i' % (prefix, int(minute) // 15 * 15)
# Key: argument (represents table granularity)
# Value:
......@@ -1055,10 +1055,10 @@ period_parser = {
lambda x: x.replace(minute=x.minute // 30 * 30),
lambda x: 1,
),
'halfhour': (
'quarterhour': (
# graph/table ratio: 30
_asMinuteString,
_asHalfHourString,
_asQuarterHourString,
'minute',
'%Y/%m/%d %H:%M',
timedelta(seconds=60),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment