ASP.NET MVC Controls
Axis Class
File
wijmo.chart.js
Module
wijmo.chart
Derived Classes
FlexRadarAxis

Represents an axis in the chart.

Constructor

Properties

Methods

Events

Constructor

constructor

constructor(position?: Position): Axis

Initializes a new instance of the Axis class.

Parameters
Returns
Axis

Properties

actualMax

Gets the actual axis maximum.

It returns a number or a Date object (for time-based data).

Type
any

actualMin

Gets the actual axis minimum.

It returns a number or a Date object (for time-based data).

Type
any

axisLine

Gets or sets a value indicating whether the axis line is visible.

Type
boolean

axisType

Gets the axis type.

Type
AxisType

binding

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'.

Type
string

format

Gets or sets the format string used for the axis labels (see Globalize).

Type
string

hostElement

Gets the axis host element.

Type
SVGGElement

itemFormatter

Gets or sets the itemFormatter function for the axis labels.

If specified, the function takes two parameters:

  • render engine: The IRenderEngine object to be used in formatting the labels.
  • current label: A string value with the following properties:
    • value: The value of the axis label to format.
    • text: The text to use in the label.
    • pos: The position in control coordinates at which the label is to be rendered.
    • cls: The CSS class to be applied to the label.

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;
}
Type
Function

itemsSource

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' } ];
Type
any

labelAlign

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.

Type
string

labelAngle

Gets or sets the rotation angle of the axis labels.

The angle is measured in degrees with valid values ranging from -90 to 90.

Type
number

labelPadding

Gets or sets the label padding.

Type
number

labels

Gets or sets a value indicating whether the axis labels are visible.

Type
boolean

logBase

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.

Type
number

majorGrid

Gets or sets a value indicating whether the axis includes grid lines.

Type
boolean

majorTickMarks

Gets or sets the location of the axis tick marks.

Type
TickMark

majorUnit

Gets or sets the number of units between axis labels.

If the axis contains date values, then the units are expressed in days.

Type
number

max

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).

Type
any

min

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).

Type
any

minorGrid

Gets or sets a value indicating whether the axis includes minor grid lines.

Type
boolean

minorTickMarks

Gets or sets the location of the minor axis tick marks.

Type
TickMark

minorUnit

Gets or sets the number of units between minor axis ticks.

If the axis contains date values, then the units are expressed in days.

Type
number

name

Gets or sets the axis name.

Type
string

origin

Gets or sets the value at which an axis crosses the perpendicular axis.

Type
number

overlappingLabels

Gets or sets a value indicating how to handle the overlapping axis labels.

Type
OverlappingLabels

plotArea

Gets or sets the plot area for the axis.

Type
PlotArea

position

Gets or sets the enumerated axis position.

Type
Position

reversed

Gets or sets a value indicating whether the axis is reversed (top to bottom or right to left).

Type
boolean

title

Gets or sets the title text shown next to the axis.

Type
string

Methods

convert

convert(val: number, maxValue?: number, minValue?: number): number

Converts the specified value from data to pixel coordinates.

Parameters
  • val: number

    The data value to convert.

  • maxValue: number Optional

    The max value of the data, it's optional.

  • minValue: number Optional

    The min value of the data, it's optional.

Returns
number

convertBack

convertBack(val: number): number

Converts the specified value from pixel to data coordinates.

Parameters
  • val: number

    The pixel coordinates to convert back.

Returns
number

onRangeChanged

onRangeChanged(e?: EventArgs): void

Raises the rangeChanged event.

Parameters
Returns
void

Events

rangeChanged

Occurs when the axis range changes.

Arguments
EventArgs

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback