summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-22 12:00:41 +0100
committerTim Moore <timoore@redhat.com>2009-12-23 00:06:50 +0100
commit4c18e89e50f274dd905876f725eb1cf98ad6b2df (patch)
treeb8aa73a644d69fb627b31fed0be2c1cf41c8f4b8
parente3a546d81cd115d7cd9105fc31ecccecfb48b71d (diff)
downloadsystemtap-steved-4c18e89e50f274dd905876f725eb1cf98ad6b2df.tar.gz
systemtap-steved-4c18e89e50f274dd905876f725eb1cf98ad6b2df.tar.xz
systemtap-steved-4c18e89e50f274dd905876f725eb1cf98ad6b2df.zip
grapher: draw axes on multiples of the axis "major unit"
* grapher/Graph.cxx (Graph::draw): Make axis values end up on multiples of majorUnit.
-rw-r--r--grapher/Graph.cxx2
1 files changed, 1 insertions, 1 deletions
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<Cairo::Context> cr)
double diff = static_cast<double>(_right - _left);
int64_t majorUnit
= static_cast<int64_t>(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);