 |
AxisWithLabelsBaseNode Class |
AxisWithLabelsBaseNode is a base class for AxisWithLabelsNode
and defines many common properties that define the value ranges, size and style of the value labels and title and other common axis properties.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic abstract class AxisWithLabelsBaseNode : GroupNode,
IDisposable
The AxisWithLabelsBaseNode type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | AxisEndPosition |
Gets or sets the axis's end position. Default value is (0, 100, 0).
|
 | AxisLineColor |
Gets or sets the color of the axis line. Default value is black.
|
 | AxisLineNode |
Gets the LineNode that is used to show axis line.
|
 | AxisLineThickness |
Gets or sets the thickness of the axis line in screen coordinates. Default value is 2.
|
 | AxisStartPosition |
Gets or sets axis's start position. Default value is (0, 0, 0).
|
 | AxisTitle |
Gets or sets the title of this axis.
|
 | AxisTitleColor |
Gets or sets the color of the axis title text. Default value is black.
|
 | AxisTitleFontSize |
Gets or sets the size of the axis title text. Default value is 6.
|
 | AxisTitlePadding |
Gets or sets a float value that how much the axis title text is positioned away from the longest value label. Default value is 3.
|
 | IsRenderingOnRightSideOfAxis |
Gets or sets a Boolean that specifies if Ticks and Labels are rendered on the right side of the axis (when true)
or on the left side of the axis (when false). An example of right side is when the axis goes from the bottom of the screen to the top of the screen, then
right side is right to the axis line.
Default value is false.
|
 | MajorTicksLength |
Gets or sets a float value that defines the length of major tick lines. Default value is 5. When set to 0, then major tick lines are not shown (but labels are still shown).
|
 | MajorTicksStep |
Gets or sets a float value that defines the step (difference) between two major ticks makers and labels (labels are rendered next to major tick markers).
When set to zero or negative value, then major ticks and labels are not shown. Default value is 1.
|
 | MaximumValue |
Gets or sets a float that defines the maximum value on the graph.
When SnapMaximumValueToMajorTicks is set to true, the actually used maximum value can be bigger then this value.
Default value is 10.
|
 | MinimumValue |
Gets or sets a float that defines the minimum value on the graph.
Default value is 0.
|
 | MinorTicksLength |
Gets or sets a float value that defines the length of minor tick lines. Default value is 2.5. When set to 0, then minor tick lines are not shown.
|
 | MinorTicksStep |
Gets or sets a float value that defines the step (difference) between two minor ticks makers.
When set to zero, negative value or when the value is smaller then MajorTicksStep, then minor ticks are not shown. Default value is 0.5.
|
 | RightDirectionVector |
Gets or sets the Vector3 that specifies the right direction of the axis - the direction in which the text is drawn.
The axis up direction is defined by the AxisStartPosition and AxisEndPosition. Default value is (1, 0, 0).
|
 | SnapMaximumValueToMajorTicks |
When true (by default) then the used maximum value is always snapped to the value with major ticks marker. This way the label for maximum value is always shown.
When false then the value that is set to the MaximumValue is always used.
|
 | TicksLineColor |
Gets or sets the color of ticks lines. Default value is black.
|
 | TicksLineThickness |
Gets or sets the thickness of the ticks lines in screen coordinates. Default value is 1.
|
 | TicksMultiLineNode |
Gets the MultiLineNode that is used to show major and minor tick lines.
|
 | ValueDisplayCulture |
Gets or sets the culture that is used to format value labels. Default value is null (using current culture).
|
 | ValueDisplayFormatString |
Gets or sets the string that defines the format string that is used to format the displayed values. When this string is empty, then values are not displayed. Default value is "#,##0".
Culture that is used to format the value is defined by the ValueDisplayCulture property (InvariantCulture by default).
|
 | ValueLabelsColor |
Gets or sets the color of the value labels text. Default value is black.
|
 | ValueLabelsFontSize |
Gets or sets the size of the value labels text. Default value is 6.
|
 | ValueLabelsPadding |
Gets or sets a float value that how much are the value labels texts positioned away from the major tick markers. Default value is 3.
|
Top
Methods| | Name | Description |
|---|
 | CloneProperties | |
 | GetMajorTickValues |
Returns an array of float value that represents the major tick values.
By default major tick values are calculated based on MinimumValue, MaximumValue and MajorTicksStep properties.
|
 | GetMinorTickValues |
Returns an array of float value that represents the minor tick values.
By default minor tick values are calculated based on MinimumValue, MaximumValue and MinorTicksStep properties.
|
 | GetRelativeValue |
GetRelativeValue returns a relative value in range from 0 to 1 from the specified absoluteValue (where the value lies between the AxisStartPosition and AxisEndPosition).
Value 0 is returned when absoluteValue is set to MinimumValue.
Value 1 is returned when absoluteValue is set to the value returned by the GetUsedMaximumValue method.
Returned value is negative when absoluteValue is smaller then MinimumValue and bigger then 1 when the absoluteValue is bigger then used maximum value.
|
 | GetUsedMaximumValue |
Returns the used maximum value. This value can be different from MaximumValue when SnapMaximumValueToMajorTicks is set to true.
|
 | GetValueLabels |
Returns an array of strings that represents the value labels.
|
 | GetValuesRange |
GetValuesRange returns the difference between used maximum value and used minimum value.
Note that used maximum value can be different from MaximumValue when SnapMaximumValueToMajorTicks is set to true
|
 | OnTicksPositionsChanged |
OnTicksPositionsChanged method must be implemented by a derived class. The method is called when the tick positions are changed.
|
 | OnUpdate |
Updates the axis if needed.
(Overrides SceneNodeOnUpdate) |
 | RequestTickValuesRegeneration | |
 | RequestUpdateAxisTitle | |
 | RequestUpdateValuesPositions | |
 | SetAxisDataRange |
SetAxisDataRange method sets the data range and ticks steps for this axis.
An advantage of this method is that it calls the RequestTickValuesRegeneration only once and not after each propety set.
|
 | SetCustomMajorTickValues |
SetCustomMajorTickValues method sets custom float values that represents custom major tick values.
The tick values should be between MinimumValue and MaximumValue (values outside of this range will not be shown).
The values define the text for the shown labels (when custom labels are not used) and also define the positions of the major tick lines and value labels -
if the value is in the middle between MinimumValue and MaximumValue,
the tick and label will be also shown in the middle between AxisStartPosition and AxisEndPosition.
When customMajorTickValues is null, then major thick lines and value labels will not be shown.
|
 | SetCustomMinorTickValues |
SetCustomMinorTickValues method sets custom float values that represents custom minor tick values.
The tick values should be between MinimumValue and MaximumValue (values outside of this range will not be shown).
The values define the positions of the minor tick lines.
When customMinorTickValues is null, then minor thick lines will not be shown.
|
 | SetCustomValueColors |
SetCustomValueColors method sets custom colors for value labels.
The number of elements in the customValueLabels array should be the same as number of displayed major ticks (to get this number call GetValueLabels method).
To stop using custom value color, call this method with null.
|
 | SetCustomValueLabels |
SetCustomValueLabels method sets custom texts that will be used as value labels.
One value label is displayed for one major tick.
The number of elements in the customValueLabels array should be the same as number of displayed major ticks (to get this number call GetValueLabels method).
To skip a value label set the array element to null or empty string.
To set custom value colors, call SetCustomValueColors method.
|
 | UpdateTicksMultiLinePositions |
UpdateTicksMultiLinePositions method sets various 3D positions (majorTickPositions, minorTickPositions, valueLabelPositions)
that represent positions of ticks and value labels in 3D space.
The values are calculated based on majorTickValues, minorTickValues and valueLabels lists.
The method is virtual and can be overridden to provide custom positioning of ticks and value labels.
|
 | UpdateTickValues |
UpdateTickValues method sets values of each major and minor tick and writes them into majorTickValues, minorTickValues lists.
The method also for each major tick sets the value label text and set that to valueLabels list.
The method is virtual and can be overridden to provide custom calculation of ticks and value label texts.
|
Top
Fields| | Name | Description |
|---|
 | customValueColors |
When not null, it provides the custom colors for the value labels.
To set custom value colors, call SetCustomValueColors method.
|
 | isAxisTitleDirty | |
 | isTickValuesDirty | |
 | isValuePositionsDirty | |
 | majorTickPositions |
A list of Vector3 values that define the positions for each major tick. Those positions lie on the axis.
|
 | majorTickValues |
A list of float values that define the major tick values. The values are stored as actual values.
|
 | minorTickPositions |
A list of Vector3 values that define the positions for each minor tick. Those positions lie on the axis.
|
 | minorTickValues |
A list of float values that define the minor tick values. The values are stored as actual values.
|
 | useCustomMajorTickValues |
When true, then custom major tick values are used and are not defined by interpolating between MinimumValue and MaximumValue.
Custom value labels are set by SetCustomMajorTickValues.
|
 | useCustomMinorTickValues |
When true, then custom minor tick values are used and are not defined by interpolating between MinimumValue and MaximumValue.
Custom value labels are set by SetCustomMinorTickValues.
|
 | useCustomValueLabels |
When true, then custom value labels are used and are not defined by calling string.Format for each major tick value.
Custom value labels are set by SetCustomValueLabels.
|
 | valueLabelPositions |
A list of Vector3 values that define the positions for each value label - text that shows the value for each major tick.
Those positions are defined away from the axis based on ValueLabelsPadding.
|
 | valueLabels |
A list of strings that define the text for value label that is shown for each major value.
Indexes of texts are the same as indexes in majorTickValues.
Custom value labels can be set by calling SetCustomValueLabels method.
To set custom value colors, call SetCustomValueColors method.
|
Top
Extension Methods| | Name | Description |
|---|
 | DumpHierarchy |
Writes the hierarchy of the GroupNode and its children into the Visual Studio Output window.
(Defined by Extensions) |
Top
See Also