@cryptotaxi247 / netdata-1 / commits / 8e775561f

fixed padding in agregated charts

Costa Tsaousis (ktsaou) committed Jun 6, 2014 at 15:45 UTC 8e775561f66c11c30937889e031497d30bd5cf49
1 file changed +3 -2
netdata.c
+3 -2
@@ -2525,10 +2525,11 @@ unsigned long rrd_stats_json(int type, RRD_STATS *st, struct web_buffer *wb, int
2525 // find the oldest entry of the round-robin
2526 long max_entries_init = (st->counter < (unsigned long)st->entries) ? st->counter : (unsigned long)st->entries;
2527
2528 - if(before == 0) before = st->last_updated.tv_sec;
2528 + time_t time_init = st->last_updated.tv_sec;
2529 +
2530 + if(before == 0 || before > time_init) before = time_init;
2531 if(after == 0) after = rrd_stats_first_entry_t(st);
2532
2531 - time_t time_init = st->last_updated.tv_sec;
2533
2534 // ---
2535