## Graphs should start/end at the same position

```
> Do you think it would be better to modify the graphs so all of them
> start/end at the same time? (There is a small offset because the first
> and last fields aren't always the same)
I thought about this, but didn't bring it up yet, because it may not be
trivial to implement.
Idea #1: Does the graphing engine support defining the x axis limits
independent of displayed data points? That is, can you draw a graph
like this (bad ASCII "art" ahead):
+-----------------------------------+
| |
| -O |
O-- | --O------O-- -- |
-- |- -- -- |
--O--| --O- |
| |
+-----------------------------------+
x_start x_end
If so, I'd say try setting x_start to current system time minus whatever
period you're displaying and x_end to current system time.
By doing so, you'll discard a few data points left to x_start, and
you'll leave some graph space empty between the last O and x_end. But
you'll have graphs displaying exactly the promised time period, and
graphs for that period will be easier to compare. I'd say that's a fine
compromise.
Idea #2: If the graphing engine does not support redefining x axis
limits, you'll need to do some tricks: if there's no data point for
x_start, compute this point as the average of the two data points before
and after x_start; also add a "null" value for x_end.
```

Here's a build that changes the dygraph range to start at the earliest date and end at the latest date in all periods:

http://globe.rndm.de/canary/index-11349-trim-graphs.html

It is possible to start at the earliest date that is in all periods and end at the latest date that is in all periods. My concern is that for some periods it can happen that this range spans only around two days (see 3_days http://i.imgur.com/RdH61YT.png ). This could confuse the user because he clicked on the "3 days" period.

What do you think?

```
(If you're cutting off values left to
x_start as discussed above, be sure to exclude them from the average.)
```

As I'm not cutting anything off (it's basically zoomed in/out) is this still an issue?

**Trac**:

**Username**: rndm