Class HorizontalAxis
The horizontal (x axis) of a GraphView
Inherited Members
Namespace: Terminal.Gui.Graphs
Assembly: Terminal.Gui.dll
Syntax
public class HorizontalAxis : Axis
Constructors
| Edit this page View SourceHorizontalAxis()
Creates a new instance of axis with an Orientation of Horizontal
Declaration
public HorizontalAxis()
Methods
| Edit this page View SourceDrawAxisLabel(GraphView, int, string)
Draws the given
text on the axis at x screenPosition.
For the screen y position use GetAxisYPosition(GraphView)Declaration
public override void DrawAxisLabel(GraphView graph, int screenPosition, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphView | graph | Graph being drawn onto |
| int | screenPosition | Number of screen columns along the axis to take before rendering |
| string | text | Text to render under the axis tick |
Overrides
| Edit this page View SourceDrawAxisLabels(GraphView)
Draws the horizontal x axis labels and Increment ticks
Declaration
public override void DrawAxisLabels(GraphView graph)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphView | graph |
Overrides
| Edit this page View SourceDrawAxisLine(GraphView)
Draws the horizontal axis line
Declaration
public override void DrawAxisLine(GraphView graph)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphView | graph |
Overrides
| Edit this page View SourceDrawAxisLine(GraphView, int, int)
Draws a horizontal axis line at the given
x, y
screen coordinatesDeclaration
protected override void DrawAxisLine(GraphView graph, int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphView | graph | |
| int | x | |
| int | y |
Overrides
| Edit this page View SourceGetAxisYPosition(GraphView)
Returns the Y screen position of the origin (typically 0,0) of graph space.
Return value is bounded by the screen i.e. the axis is always rendered even
if the origin is offscreen.
Declaration
public int GetAxisYPosition(GraphView graph)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphView | graph |
Returns
| Type | Description |
|---|---|
| int |