From 4c18e89e50f274dd905876f725eb1cf98ad6b2df Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 22 Dec 2009 12:00:41 +0100 Subject: grapher: draw axes on multiples of the axis "major unit" * grapher/Graph.cxx (Graph::draw): Make axis values end up on multiples of majorUnit. --- grapher/Graph.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 27b6a24f..afb52c74 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -95,7 +95,7 @@ void Graph::draw(Cairo::RefPtr cr) double diff = static_cast(_right - _left); int64_t majorUnit = static_cast(pow(10.0, floor(log(diff) / log(10.0)))); - int64_t startTime = (_left / majorUnit) * majorUnit; + int64_t startTime = ((_left - _timeBase) / majorUnit) * majorUnit + _timeBase; cr->save(); cr->set_source_rgba(1.0, 1.0, 1.0, .9); cr->set_line_cap(Cairo::LINE_CAP_BUTT); -- cgit