Class Axis
Renders a continuous line with grid line ticks and labels
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Terminal.Gui.Graphs
Assembly: Terminal.Gui.dll
Syntax
public abstract class Axis
Constructors
Axis(Orientation)
Populates base properties and sets the read only Orientation
Declaration
protected Axis(Orientation orientation)
Parameters
Type | Name | Description |
---|---|---|
Orientation | orientation |
Fields
LabelGetter
Allows you to control what label text is rendered for a given Increment
when ShowLabelsEvery is above 0
Declaration
public LabelGetterDelegate LabelGetter
Field Value
Type | Description |
---|---|
LabelGetterDelegate |
Text
Displayed below/to left of labels (see Orientation).
If text is not visible, check MarginBottom / MarginLeft
Declaration
public string Text
Field Value
Type | Description |
---|---|
System.String |
Properties
Increment
Number of units of graph space between ticks on axis. 0 for no ticks
Declaration
public float Increment { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Minimum
The minimum axis point to show. Defaults to null (no minimum)
Declaration
public float? Minimum { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> |
Orientation
Direction of the axis
Declaration
public Orientation Orientation { get; }
Property Value
Type | Description |
---|---|
Orientation |
ShowLabelsEvery
The number of Increment before an label is added.
0 = never show labels
Declaration
public uint ShowLabelsEvery { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Visible
True to render axis. Defaults to true
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
DrawAxisLabel(GraphView, Int32, String)
Declaration
public abstract void DrawAxisLabel(GraphView graph, int screenPosition, string text)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph | |
System.Int32 | screenPosition | |
System.String | text |
DrawAxisLabels(GraphView)
Draws labels and axis Increment ticks
Declaration
public abstract void DrawAxisLabels(GraphView graph)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph |
DrawAxisLine(GraphView)
Draws the solid line of the axis
Declaration
public abstract void DrawAxisLine(GraphView graph)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph |
DrawAxisLine(GraphView, Int32, Int32)
Draws a single cell of the solid line of the axis
Declaration
protected abstract void DrawAxisLine(GraphView graph, int x, int y)
Parameters
Type | Name | Description |
---|---|---|
GraphView | graph | |
System.Int32 | x | |
System.Int32 | y |
Reset()
Resets all configurable properties of the axis to default values
Declaration
public virtual void Reset()