diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-22 11:35:38 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-23 00:04:11 +0100 |
commit | e3a546d81cd115d7cd9105fc31ecccecfb48b71d (patch) | |
tree | edaf59835ce9774b69c72ddbe9ec28dfb925b188 /grapher/Graph.hxx | |
parent | 2d0ddea123e8d5d1113b80692689a80f37d46e6f (diff) | |
download | systemtap-steved-e3a546d81cd115d7cd9105fc31ecccecfb48b71d.tar.gz systemtap-steved-e3a546d81cd115d7cd9105fc31ecccecfb48b71d.tar.xz systemtap-steved-e3a546d81cd115d7cd9105fc31ecccecfb48b71d.zip |
grapher: scroll continuously with time
Don't scale graph based on how much data will fit. This didn't work
very well and resulted in distracting, weird scale changes. We now
assume that scripts output their time (x axis) in milliseconds.
* grapher/Graph.hxx (setCurrentTime): New function.
* grapher/Graph.cxx (Graph::draw): Assume a fixed default scale of 1
pixel = 5 milliseconds and don't do any autoscaling.
* grapher/GraphWidget.cxx (GraphWidget constructor): Set global time
base on startup.
(on_expose_event): Don't search graphs for earliest time.
* grapher/GraphWidget.hxx (_timeBaseInitialized): delete
* grapher/Time.hxx: new file; interface to timeval.
Diffstat (limited to 'grapher/Graph.hxx')
-rw-r--r-- | grapher/Graph.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx index efabd22d..d9f615b3 100644 --- a/grapher/Graph.hxx +++ b/grapher/Graph.hxx @@ -50,12 +50,14 @@ public: GraphDataList& getDatasets() { return _datasets; } int64_t getTimeAtPoint(double x); void window2GraphCoords(double x, double y, double& xgraph, double& ygraph); + static void setCurrentTime(int64_t time) { _currentTime = time; } protected: GraphDataList _datasets; int64_t _left; int64_t _right; double _top; double _bottom; + static int64_t _currentTime; }; } #endif |