![]() |
CNiAxis | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiAxis.h |
Overview
CNiAxis encapsulates the interface to a single axis of a graph, knob, or slide control, which allows you to modify the appearance and behavior of the axis.
You obtain individual axes using the Axes property on a CNiGraph object.
Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.
Base Classes
Data Items
![]() |
bool | AutoScale | Determines if the system automatically sets the minimum and maximum limits of the axis. |
![]() |
CString | Caption | Specifies the text to draw on the axis. |
![]() |
CNiColor | CaptionColor | Specifies the color used to draw the caption. |
![]() |
bool | Discrete | Represents only discrete values on the axis, according to the base and interval properties. |
![]() |
double | DiscreteBase | Specifies the base value for discrete axes. |
![]() |
double | DiscreteInterval | Specifies the interval between discrete values. |
![]() |
CString | FormatString | Specifies the format string for formatting the labels on this axis. |
![]() |
bool | Inverted | Specifies if the direction of an axis is inverted. |
![]() |
CNiLabels | Labels | Returns a CNiLabel object, which specifies how labels appear on the axis. |
![]() |
bool | Log | Specifies if the axis has a Log10 scale. |
![]() |
double | Maximum | Specifies the maximum value of the axis. |
![]() |
double | Minimum | Specifies the minimum value of the axis. |
![]() |
CString | Name | Specifies the name of the axis. |
![]() |
CNiTicks | Ticks | Returns a CNiTicks object, which specifies how divisions and ticks appear on this axis. |
![]() |
CNiValuePairs | ValuePairs | Gets a collection of ValuePair objects associated with the control. |
![]() |
bool | Visible | Specifies if the axis is visible or hidden. |
Constructors
![]() |
CNiAxis() |
Default constructor. | |
![]() |
CNiAxis( CWAxis_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWAxis_CI pointer. | |
![]() |
CNiAxis( const CNiAxis& source ) |
Copy constructor. |
Destructors
Functions
![]() |
void | Causes the axis to rescale immediately. | |
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
const CNiAxis & | Assignment operator. | |
![]() |
void | SetMinMax( double Minimum, double Maximum ) |
Sets both the minimum and the maximum values of the axis at the same time. |
Example
// Set the caption and visibility of the x axis.
CNiGraph graph; CNiAxis xAxis = graph.Axes.Item("XAxis"); xAxis.Caption = "Temperature"; xAxis.Visible = true;