From 5891de489db0e172162279247fb633a719fa3756 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 7 Dec 2009 12:43:56 +0100 Subject: option to display graph times relative to the start time This avoids having humongous numbers displayed on the graphs' x axis. Also, the dialog for adding a data set to a graph was cleaned up. * grapher/graph-dialog.glade: Add check box for display of relative time and a label for the data set list. Force the list of data sets to be larger. * grapher/Graph.hxx (_timeBase): new member * grapher/Graph.cxx (draw): Subtract _timeBase from displayed time value. * grapher/GraphWidget.hxx (DataModelColumns): Add a column for a data set's title, which is optional at the moment. * grapher/GraphWidget.hxx (_globalTimeBase, _timeBaseInitialized, _relativeTimesButton, _displayRelativeTimes): new members * grapher/GraphWidget.hxx (GraphWidget): Hook up check button for displaying relative time. (on_expose_event): Determine base time if needed; set base time in graphs. (onDataDialogOpen): Insert graph data set's name (key) and title into the list of data sets. --- grapher/Graph.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'grapher/Graph.hxx') diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx index 044a66d3..93e23deb 100644 --- a/grapher/Graph.hxx +++ b/grapher/Graph.hxx @@ -39,6 +39,7 @@ namespace systemtap double _xOffset; double _yOffset; std::tr1::shared_ptr _playButton; + int64_t _timeBase; DatasetList& getDatasets() { return _datasets; } int64_t getTimeAtPoint(double x); void window2GraphCoords(double x, double y, double& xgraph, double& ygraph); -- cgit