Forced display of end time regardless of current time

Asked by Hans Hermans

I have a graph that shows data between 9:00 today and 17:00 today. I show the last 7 days during this period laid on top of each other, and this works fine with timeShift(). The problem I have is that, at 10 a.m., my graph only shows 9 a.m. to 10 a.m. because this is the data limitation for today. I would like to have a graph showing the whole time period for the last 6 days and just the little bit of today that's available (so today's line should just stop at 10 a.m., where 6 other lines continue).

Is this possible? Different ranges of data are shown, but in this special case there aren't any conflicts in how the graph's axes must be configured. Would it involve an easy hack somewhere in the render code?

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nicholas Leskiw (nleskiw) said :
#1

This is not part of the rendering code.

in whisper.py lines 634 - 635:

634 if untilTime > now:
635 untilTime = now

You can change this in your install, but I take no responsibility if this breaks things horribly. I think that simply commenting this out may seem to work at first, then give you a bunch of invalid data when the whisper file writes to the end and wraps back around.

As such, please don't submit any changes to trunk for this.

A system would need to be engineered that returns a bunch of None values into valueList ahead of time.time() for an appropriate period if whisper detects untilTime > now.

Might I just suggest using a relative time period of the last 24 hours instead? Maybe split the 6 timeShift lines into a separate graph?

Revision history for this message
chrismd (chrismd) said :
#2

Actually this is a supported behavior with the Ceres database in the 1.1 branch (bleeding edge) but as Nick points out, it simply won't work with whisper.

Another approach you could take would be to write a new rendering function that alters the data returned by whisper and pads it with Nones appropriately.

Can you help with this problem?

Provide an answer of your own, or ask Hans Hermans for more information if necessary.

To post a message you must log in.