Class GraphView
Control for rendering graphs (bar, scatter etc)
public class GraphView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
- Inheritance
-
GraphView
- Implements
- Inherited Members
Constructors
- GraphView()
Creates a new graph with a 1 to 1 graph space with absolute layout
Properties
- Annotations
Elements drawn into graph after series have been drawn e.g. Legends etc
- AxisX
Horizontal axis
- AxisY
Vertical axis
- CellSize
Translates console width/height into graph space. Defaults to 1 row/col of console space being 1 unit of graph space.
- GraphColor
The color of the background of the graph and axis/labels
- MarginBottom
Amount of space to leave on bottom of control. Graph content (Series) will not be rendered in margins but axis labels may be
- MarginLeft
Amount of space to leave on left of control. Graph content (Series) will not be rendered in margins but axis labels may be
- ScrollOffset
The graph space position of the bottom left of the control. Changing this scrolls the viewport around in the graph
- Series
Collection of data series that are rendered in the graph
Methods
- DrawLine(Point, Point, Rune)
Draws a line between two points in screen space. Can be diagonals.
- GraphSpaceToScreen(PointF)
Calculates the screen location for a given point in graph space. Bear in mind these be off screen
- OnEnter(View)
Method invoked when a view gets focus.
- PageDown()
Scrolls the graph down 1 page
- PageUp()
Scrolls the graph up 1 page
- ProcessKey(KeyEvent)
If the view is focused, gives the view a chance to process the keystroke.
- Redraw(Rect)
Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
- Reset()
Clears all settings configured on the graph and resets all properties to default values (CellSize, ScrollOffset etc)
- ScreenToGraphSpace(int, int)
Returns the section of the graph that is represented by the given screen position
- ScreenToGraphSpace(Rect)
Returns the section of the graph that is represented by the screen area
- Scroll(float, float)
Scrolls the view by a given number of units in graph space. See CellSize to translate this into rows/cols
- SetDriverColorToGraphColor()
Sets the color attribute of Driver to the GraphColor (if defined) or ColorScheme otherwise.