summaryrefslogtreecommitdiffstats
path: root/grapher/Graph.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-03 19:31:08 +0100
committerTim Moore <timoore@redhat.com>2009-12-03 19:31:08 +0100
commit03ebf81c360e429ef1e4f8bae48fe524f712589a (patch)
treef16a68b7f8cb14224d0e38181fea21617c93e9d8 /grapher/Graph.cxx
parentc10fce7d6aaa57a4f94f9d7aeea906597456f7ce (diff)
downloadsystemtap-steved-03ebf81c360e429ef1e4f8bae48fe524f712589a.tar.gz
systemtap-steved-03ebf81c360e429ef1e4f8bae48fe524f712589a.tar.xz
systemtap-steved-03ebf81c360e429ef1e4f8bae48fe524f712589a.zip
Hover text for event-style graphs
Don't draw the data value for an event; only display it in hover text. * grapher/Graph.hxx (window2GraphCoords): new function * grapher/Graph.cxx (window2GraphCoords): ditto * grapher/GraphStyle.cxx (GraphStyleEvent::dataIndexAtPoint): new function implementation.
Diffstat (limited to 'grapher/Graph.cxx')
-rw-r--r--grapher/Graph.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx
index 55ffcdf2..57f1dc9a 100644
--- a/grapher/Graph.cxx
+++ b/grapher/Graph.cxx
@@ -205,4 +205,11 @@ namespace systemtap
return (_left
+ (_right - _left) * ((x - _xOffset)/(_zoomFactor * _graphWidth)));
}
+
+ void Graph::window2GraphCoords(double x, double y,
+ double& xgraph, double& ygraph)
+ {
+ xgraph = x -_xOffset;
+ ygraph = -y + _yOffset + _graphHeight;
+ }
}