Class GraphView
Displays graphs (bar, scatter, etc...) with flexible labels, scaling, and scrolling
public class GraphView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable
- 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 (in viewport columns) to reserve on the bottom of the graph for axis labels and legends. Graph content (Series) will not be rendered in this internal margin area, but axis labels may be. This is separate from the View's Margin, Border, and Padding adornments, which create space outside the viewport.
- MarginLeft
Amount of space (in viewport columns) to reserve on the left of the graph for axis labels. Graph content (Series) will not be rendered in this internal margin area, but axis labels may be. This is separate from the View's Margin, Border, and Padding adornments, which create space outside the viewport.
- ScrollOffset
The graph space position of the bottom left of the graph. 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.
- GraphSpaceToViewport(PointF)
Calculates the viewport-relative location for a given point in graph space.
- OnDrawingContent(DrawContext?)
Called when the View's content is to be drawn. The default implementation does nothing.
- PageDown()
Scrolls the graph down 1 page.
- PageUp()
Scrolls the graph up 1 page.
- Reset()
Clears all settings configured on the graph and resets all properties to default values ( CellSize, ScrollOffset etc) .
- 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 Scheme otherwise.
- ViewportToGraphSpace(Rectangle)
Returns the section of the graph that is represented by the viewport-relative area.
- ViewportToGraphSpace(int, int)
Returns the section of the graph that is represented by the given viewport-relative position.