summaryrefslogtreecommitdiffstats
path: root/grapher/GraphStyle.cxx
Commit message (Collapse)AuthorAgeFilesLines
* grapher: scale from right end of graphTim Moore2009-12-231-19/+38
| | | | | | | | | | | | | The right side of the graph represents the most recent time. Since there is never anything interesting to the right of that, it makes sense to have the origin of the scaling be there. * grapher/Graph.hxx (getHorizontalScale): new function * grapher/GraphStyle.cxx (GraphStyleBar::draw, GraphStyleDot::draw, GraphStyleEvent::draw): Use cairo transform functions to set up scaling. (GraphStyleBar::dataIndexAtPoint, GraphStyleEvent::dataIndexAtPoint): Base calculations on scaling from right.
* grapher: fix bug in looking up event under pointerTim Moore2009-12-231-1/+1
| | | | | | | I don't why I thought this ever worked. * grapher/GraphStyle.cxx (GraphStyleEvent::dataIndexAtPoint): return distance from beginning of buffer, not beginning of search bounds.
* change namespace indentation to 0Tim Moore2009-12-211-164/+164
| | | | | A silly change, but this works better with other tools, like git diff. I should have started the C++ files this way.
* add copyright and license to grapher filesTim Moore2009-12-071-0/+8
|
* restore event square colorTim Moore2009-12-041-0/+2
| | | | | * grapher/GraphStyle.cxx (GraphStyleEvent::draw): set event color in inner loop.
* Error check in hover text code for empty graphsTim Moore2009-12-031-2/+4
| | | | | * grapher/GraphStyle.cxx(GraphStyleEvent::dataIndexAtPoint, GraphStyleBar::dataIndexAtPoint): check for empty graph data
* Hover text for event-style graphsTim Moore2009-12-031-13/+35
| | | | | | | | | 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.
* Make the hover text conform to data displayed.Tim Moore2009-12-021-0/+26
| | | | | | | | | Start of code to be more selective about the association between the hover text and the underling graph. Also, show the data set name in hover text. * grapher/GraphStyle.hxx (dataIndexAtPoint): New virtual function. * grapher/GraphStyle.cxx (dataIndexAtPoint): Implementation for bar graphs * grapher/GraphWidget.cxx (onHoverTimeout): Use dataIndexAtPoint.
* Refactor drawing of different styles of graph into classesTim Moore2009-12-021-0/+131
* grapher/GraphStyle.cxx: New file * grapher/GraphStyle.hxx: New file * grapher/Graph(draw): Move much drawing code to GraphStyle::draw