Client-Side API Reference > FlexChart > wijmo.chart > Axis Class |
constructor(position?: Position): Axis
Initializes a new instance of the Axis class.
The position of the axis on the chart.
Gets the actual axis maximum.
It returns a number or a Date object (for time-based data).
Gets the actual axis minimum.
It returns a number or a Date object (for time-based data).
Gets or sets the comma-separated property names for the itemsSource property to use in axis labels.
The first name specifies the value on the axis, the second represents the corresponding axis label. The default value is 'value,text'.
Gets or sets the itemFormatter function for the axis labels.
If specified, the function takes two parameters:
The function returns the label parameters of labels for which properties are modified.
For example:
chart.axisY.itemFormatter = function(engine, label) { if (label.val > 5){ engine.textFill = 'red'; // red text label.cls = null; // no default CSS } return label; }
Gets or sets the items source for the axis labels.
Names of the properties are specified by the binding.
For example:
// default value for Axis.binding is 'value,text' chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];
Gets or sets the label alignment.
By default the labels are centered. The supported values are 'left' and 'right for x-axis and 'top' and 'bottom' for y-axis.
Gets or sets the rotation angle of the axis labels.
The angle is measured in degrees with valid values ranging from -90 to 90.
Gets or sets the logarithmic base of the axis.
If the base is not specified the axis uses a linear scale.
Use the logBase property to spread data that is clustered around the origin. This is common in several financial and economic data sets.
Gets or sets the number of units between axis labels.
If the axis contains date values, then the units are expressed in days.
Gets or sets the maximum value shown on the axis.
If not set, the maximum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the minimum value shown on the axis.
If not set, the minimum is calculated automatically. The value can be a number or a Date object (for time-based data).
Gets or sets the number of units between minor axis ticks.
If the axis contains date values, then the units are expressed in days.
Gets or sets a value indicating how to handle the overlapping axis labels.
Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).
convert(val: number, maxValue?: number, minValue?: number): number
Converts the specified value from data to pixel coordinates.
The data value to convert.
The max value of the data, it's optional.
The min value of the data, it's optional.
convertBack(val: number): number
Converts the specified value from pixel to data coordinates.
The pixel coordinates to convert back.
onRangeChanged(e?: EventArgs): void
Raises the rangeChanged event.
Represents an axis in the chart.