React PolarChart - argumentAxis

Specifies argument axis options for the PolarChart widget.

Type:

Object

For charting, the polar coordinate system is used to determine each point uniquely on a plane through two numbers, the argument and the value of the point. A circular and straight lines (the axis of arguments and the axis of values) are specified to define the coordinates. To define the argument axis, use the argumentAxis configuration object. To define the value axis, use the valueAxis configuration object. To set the properties of all axes to a common value, use the commonAxisSettings configuration object. This object exposes the properties that can be specified for all axes simultaneously. Note that the value specified for an axis individually (in the argumentAxis or valueAxis object) overrides the value specified in the commonAxisSettings object.

allowDecimals

Specifies whether to allow decimal values on the axis. When false, the axis contains integer values only.

Type:

Boolean

Default Value: undefined

argumentType

Specifies the desired type of axis values.

Type:

String

Default Value: undefined
Accepted Values: 'datetime' | 'numeric' | 'string'

The type of the axis values is determined based on the type of the values specified in the corresponding data source field of the chart's series. If arguments are specified as numeric values in a series data source, the argument axis values will also be of the numeric type. The same logic is used when string or date-time arguments are specified in the data source.

In some scenarios, you may need the type of the arguments that are specified in the data source to be converted to another type. In this instance, specify the desired type for the axis values using the argumentType property.

Use the ChartDataType enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Numeric, DateTime, and String.

axisDivisionFactor

Specifies the minimum distance between two neighboring major ticks in pixels. Applies only to the axes of the "continuous" and "logarithmic" types.

Type:

Number

Default Value: 50

For axes displaying numbers, the distance between major ticks depends on two interconnected options: axisDivisionFactor and tickInterval. Consider that you have specified both these options. If the specified tick interval leads the pixel distance between two ticks to being less than the axisDivisionFactor value, this tick interval will be ignored.

Use the axisDivisionFactor option only if you need to set the distance between ticks not knowing the axis values. Otherwise, use the tickInterval option.

categories

Specifies the order in which arguments (categories) are arranged on the discrete argument axis.

Type:

Array<Number | String | Date>

If you specify the chart's data using a common array of objects, these objects may be displayed in a random order. If you set the chart's data for each series individually, the order in which the series are positioned in the series array can also be random. In these instances, the resulting argument order on the discrete argument axis may not be appropriate. To specify the order of categories (arguments on a discrete argument axis), assign an array of category names to the categories property.

color

Specifies the color of the line that represents an axis.

Type:

String

Default Value: '#767676'

This option supports the following colors:

constantLines[]

Defines an array of the argument axis constant lines.

Type:

Array<Object>

Cannot be used in themes.

A constant line is a straight line that can be used to display, for example, an asymptote of a graph. To display constant lines on a chart, assign an array of objects specifying the options of each constant line to the constantLines field. It is necessary to set the value option within these objects. The other options can be set if required.

You can customize the appearance of all the argument axis constant lines at once. For this purpose, use the argumentAxis.constantLineStyle configuration object. Note that the options that are set within the argumentAxis.constantLine object override the corresponding options that are set within the argumentAxis.constantLineStyle object.

constantLineStyle

Specifies the appearance of all the widget's constant lines.

Type:

Object

Use this object to set the appearance options for the constant lines of both the argument and value axes. For example, you can change the color, dash style and width of the line using corresponding options or define the look of the labels using the label object.

To specify styles for the constant lines of the argument and value axis separately, use the constantLineStyle object within the argumentAxis or valueAxis configuration object correspondingly. Note that the options that are set within these objects override the corresponding options that are set within the commonAxisSettings.constantLineStyle object.

In addition, you can define the appearance of each constant line individually. For more information, refer to the argumentAxis.constantLines or valueAxis.constantLines object description.

discreteAxisDivisionMode

Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels.

Type:

String

Default Value: 'betweenLabels'
Accepted Values: 'betweenLabels' | 'crossLabels'

When a discrete axis is divided, its ticks/grid lines are located between labels by default. If this is not appropriate, use the discreteAxisDivisionMode property to set the required mode for positioning ticks and grid lines on a discrete axis.

NOTE
This option is not designed to work in the spider web mode.

Use the DiscreteAxisDivisionMode enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: BetweenLabels and CrossLabels.

View Demo

endOnTick

Specifies whether to force the axis to start and end on ticks.

Type:

Boolean

Default Value: undefined

firstPointOnStartAngle

Specifies whether or not to display the first point at the angle specified by the startAngle option.

Type:

Boolean

Default Value: false

This option is specific to a discrete argument axis.

View Demo

grid

An object defining the configuration options for the grid lines of an axis in the PolarChart widget.

Type:

Object

Grid lines are the reference lines used to improve the readability of a chart's visual data. The grid object exposes the properties that allow you to specify visibility and appearance settings for axis grid lines. To learn more about axis grid lines and their options, refer to the Grid topic.

PolarChart Grid Lines

hoverMode

Specifies the elements that will be highlighted when the argument axis is hovered over.

Type:

String

Default Value: 'none'
Accepted Values: 'allArgumentPoints' | 'none'

The following values are accepted:

  • none
    Nothing happens when the argument axis is hovered over.
  • allArgumentPoints
    The points that correspond to the argument that is currently hovered over are highlighted. To change the way the points are highlighted, set the options within the series.point.hoverStyle object.

Use the ArgumentAxisHoverMode enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: AllArgumentPoints and None.

inverted

Indicates whether or not an axis is inverted.

Type:

Boolean

Default Value: false

When an axis is inverted, the maximum and minimum values are reversed. As a result, the axis values increase in a direction that is opposite to the initial direction. The chart series are also inverted.

View Demo

label

Specifies options for argument axis labels.

Type:

Object

Axis labels represent textual values for axis ticks, which are not visible by default. To specify custom settings for the argument axis labels, use the label configuration object. To set a common value for labels on all axes, use the commonAxisSettings.label configuration object. This object exposes the properties that can be specified for labels on all axes at once. Note that values specified for the argument axis individually (in the argumentAxis.label object) override values that are specified for all axes (in the commonAxisSettings.label object).

logarithmBase

Specifies the value to be raised to a power when generating ticks for a logarithmic axis.

Type:

Number

Default Value: 10

By default, ticks on a logarithmic axis are generated on a base of 10, i.e., 0.1, 1, 10, 100, 1000 etc. But you can specify a base you require using the logarithmBase option. For example, if you set this option to 5, the following ticks will be generated: 0.5, 5, 25, 125, 625, etc.

NOTE
The value assigned to the logarithmBase option should be greater than 1.

minorGrid

Specifies the options of the minor grid.

Type:

Object

In addition to the major grid built on major ticks, the PolarChart widget provides the minor grid that is built on minor ticks. The lines of the minor grid extend from the minor ticks throughout the entire chart's plot.

NOTE
Neither minor ticks, nor the minor grid can be used if the axis is discrete.

To specify the appearance of grid lines, use the options of the minorGrid object. Declared within the commonAxisSettings object, the minorGrid object changes the appearance of value and argument axes simultaneously. To change the appearance of the value or argument axis individually, declare the minorGrid object in the argumentAxis or valueAxis object respectively. Settings specified individually override those that are set in the commonAxisSettings object.

To make the minor grid visible, set the visible option of the minorGrid object to true. Additionally, you can change the color, opacity and width of the grid lines using the corresponding options.

NOTE
We recommend you use the minor grid only in conjunction with the major grid.

minorTick

Specifies the options of the minor ticks.

Type:

Object

In addition to major ticks, the PolarChart widget provides the capability to draw minor ticks. Minor ticks divide an axis segment that lies between two neighboring major ticks. To specify how to generate minor ticks, use the minorTickInterval or minorTickCount options.

To configure the appearance of minor ticks, use the options of the minorTick object. Declared within the commonAxisSettings object, the minorTick object sets options for all minor ticks. To change the appearance of the minor ticks that belong to the argument or value axis individually, declare the minorTick object in the argumentAxis or valueAxis object respectively. Settings specified individually override those that are set in the commonAxisSettings object.

By default, minor ticks are hidden. To make them visible, assign true to the visible option of the minorTick object. Additionally, you can change the color, opacity and width of the minor ticks using the corresponding options.

NOTE
Minor ticks cannot be displayed on a discrete axis.

minorTickCount

Specifies the number of minor ticks between two neighboring major ticks.

Type:

Number

Default Value: undefined

NOTE
If you set both the minorTickCount and the minorTickInterval options, the minorTickCount option will be ignored.

minorTickInterval

Specifies the interval between minor ticks.

Type:

Number

|

Object

|

String

Default Value: undefined
Accepted Values: 'day' | 'hour' | 'millisecond' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year'

To divide a lengthy chart axis into shorter segments, major and minor ticks are used. Major ticks are accompanied with axis labels. Between each pair of neighboring major ticks, several minor ticks reside. Minor ticks are required when major ticks are far from each other. To set a custom minor tick interval, use the minorTickInterval option. If this option is not set, minor ticks are arranged automatically.

In case your axis displays numbers, assign a numeric value to this option. If the axis displays dates, assign one of the predefined string values. To set the interval to several days, hours, etc., assign an object with the corresponding field specified (days, hours or another field). Note that this object must contain only one of the fields described in this section.

NOTE
The minorTickInterval option can be applied to a continuous axis only. For logarithmic axes, use the minorTickCount option.

When using the widget as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control, specify this option using the VizTimeInterval enum. This enum accepts the same values, but they start with an upper-case letter, for example, 'day' becomes Day.

opacity

Specifies the opacity of the line that represents an axis.

Type:

Number

Default Value: undefined

originValue

Specifies the value to be used as the origin for the argument axis.

Type:

Number

Default Value: undefined

Normally, PolarChart calculates the origin value of the argument axis automatically depending on the smallest argument of series points. In case you need to specify it explicitly, use the argumentAxis.originValue option.

NOTE
If the series contains points whose argument is less than the specified origin value, these points will reside to the left from the argument axis' origin. This may lead the start and end of the resulting diagram to overlap.

period

Specifies the period of the argument values in the data source.

Type:

Number

Default Value: undefined

This option makes sense when you have a continuous argument axis. By default, all the argument values in the data source fit one circle of the argument axis. You can use the period option to set the interval of argument values that fits one circle of the argument axis. For instance, the argument values from 5 to 10 can be displayed with a period set to 5 in two argument axis circles: from 0 to 5 and from 6 to 10.

View Demo

startAngle

Specifies the angle in arc degrees to which the argument axis should be rotated. The positive values rotate the axis clockwise.

Type:

Number

Default Value: 0

Start Angle ChartJS

strips[]

Specifies options for argument axis strips.

Type:

Array<Object>

Cannot be used in themes.

Strips are the highlighted areas in a chart within the defined range of values (minimum and maximum) for an axis to which they belong. In general, strips are used to visually represent a range of values behind a series to trace whether the series points' values fall in or out of that range. For more details on strips, refer to the Strips topic.

To define strips for the argument axis, use the strips array. When a strip's startValue, endValue and color properties are specified, the strip is displayed in a chart. In addition, you can show a label with descriptive information on a strip. To set the text for a label, use the strip's label object.

If you need to set similar values for all strips of all axes, use the commonAxisSettings.stripStyle configuration object. It exposes the properties that can be specified for strips of all axes at once. Note that the values specified for the argument axis individually (in the argumentAxis.strips object) override the values that are specified for all axes (in the commonAxisSettings.stripStyle object).

stripStyle

An object defining configuration options for strip style.

Type:

Object

Strips are the highlighted areas of a chart within a defined range of values (maximum and minimum) for an axis to which they belong. In general, strips are used to visually represent a range of values behind a series, to trace whether the series point values fall in or out of that range. For more details on strips, refer to the Strips topic.

To set options for configuring strip style, define the stripStyle object within the argumentAxis or valueAxis configuration object. To set common options for all strips in a chart, define the stripStyle object within the commonAxisSettings configuration object. Note that the values that are set for an individual axis override the corresponding common values.

tick

An object defining the configuration options for axis ticks.

Type:

Object

Ticks divide an axis into equal sections by a step whose value is determined automatically, or by the tickInterval and axisDivisionFactor options of an axis. Ticks improve the readability of charts, but are not visible in the PolarChart widget by default. To set up tick configuration options, define the tick object within the argumentAxis or valueAxis configuration object. To set common options for all ticks in a chart, define the tick object within the commonAxisSettings configuration object. Note that the values that are set for an individual axis override the corresponding common values.

tickInterval

Specifies an interval between axis ticks/grid lines.

Type:

Number

|

Object

|

String

Default Value: undefined
Accepted Values: 'day' | 'hour' | 'millisecond' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year'

Use this option to divide the scale by ticks in a specified interval one from another. If this option is not set, ticks are automatically arranged so that their labels do not overlap each other.

In case of a numeric axis, assign a numeric value to this option.

If the axis is of the date-time type, assign one of the predefined string values or an object to this option. The object's fields specify the number of days, hours, etc.

When you use a logarithmic axis, ticks are generated on a base of powers. For example, assume that the logarithm base is 10. Then, if the tick interval is 1, ticks are generated at 0.01, 0.1, 1, 10, 100, 1000, 10000, etc. If the tick interval is 2, ticks are generated at 0.1, 10, 1000, etc.

To set the tickInterval option for several axes at once, use the commonAxisSettings configuration object. To set this option for an individual axis, use the argumentAxis or valueAxis configuration object.

When using the widget as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control, specify this option using the VizTimeInterval enum. This enum accepts the same values, but they start with an upper-case letter, for example, 'day' becomes Day.

type

Specifies the required type of the argument axis.

Type:

String

Default Value: undefined
Accepted Values: 'continuous' | 'discrete' | 'logarithmic'

The 'discrete' type is set when string arguments are specified in the data source of the chart's series. The discrete axis is divided by the values (called categories) that are specified as arguments in the data source. The categories order can be specified by the categories property, if the order used in the data source is not appropriate.

The 'continuous' type is set when numeric or date-time arguments are specified in the series data source. The continuous axis is divided automatically.

The 'logarithmic' type can be set when numeric values are specified in the series data source. The logarithmic axis is useful when you visualize a dataset of rapidly-growing values. Each axis tick represents a particular value that is raised to the next power in turn. This particular value is specified by the logarithmBase option. For example, if you set this option to 5, the following ticks will be generated: 50, 51, 52, 53 etc.

On continuous and logarithmic axes, ticks and grid lines are generated automatically. In addition, you can set a custom tick interval (the tickInterval or axisDivisionFactor options).

NOTE
If you require a discrete axis when numeric or date-time arguments are specified in the data source, set the type option to 'discrete' explicitly.

Use the AxisScaleType enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Discrete, Continuous, and Logarithmic.

visible

Indicates whether or not the line that represents an axis in a chart is visible.

Type:

Boolean

Default Value: true

width

Specifies the width of the line that represents an axis in the chart.

Type:

Number

Default Value: 1