argumentAxis

Specifies argument axis options for the dxChart widget.

Type: Object

For charting, the rectangular coordinate system is used to determine each point uniquely on a plane through two numbers, the argument and the value of the point. Two perpendicular directed 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 (axes), 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.

Show Example:
jQuery

This example shows the argument axis of a discrete type. Here the axis is ordered by categories, divided using the 'crossLabels' mode and moved to the top of the chart. In addition, the grid lines of the axis are made visible.


                                    

                                    

argumentType

Specifies the desired type of axis values.

Type: String
Default Value: undefined
Accepted Values: 'numeric' | 'datetime' | '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.

Show Example:
jQuery

Here, the 'year' field of the 'dataSource' array is intentionally set in the 'numeric' format. To display the values of this field in the 'datetime' format on the chart, the argumentType option is used.


                                    

                                    

axisDivisionFactor

Specifies a coefficient for dividing the argument axis.

Type: Number
Default Value: 50

The argument axis is divided by default so that the labels corresponding to the ticks/grid lines do not overlap each other. If you need to make the axis tick interval larger or smaller, use the axisDivisionFactor property. This property value is a coefficient used internally to calculate the distance between axis labels. This allows you to set an axis division without knowledge of the actual axis values.

NOTE: This option is used for continuous and logarithmic argument axes only.

Show Example:
jQuery

In the example below, the argument axis axisDivisionFactor option is set to 30.


                                    

                                    

categories

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

Type: Array

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.

Show Example:
jQuery

Here, years in the chart's data source are represented as strings. By default they will be displayed on the argument axis in the same order as they are listed in the data source. To display them in another order, the categories option is used.


                                    

                                    

color

Specifies the color of the line that represents an axis.

Type: String
Default Value: '#d3d3d3'

This option supports the following colors.

  • hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • predefined/cross-browser color names
  • predefined SVG colors (not supported in Internet Explorer 8)
Show Example:
jQuery

In this example, the argument axis is colored in green.


                                    

                                    

constantLines[]

Defines an array of the argument axis constant lines.

Type: Array

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.

Show Example:
jQuery

In the following example, each argument axis constant line is drawn in a different color and width.


                                    

                                    

constantLineStyle

Specifies the appearance options for the constant lines of the argument axis.

Type: Object

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

To specify a style for the constant lines of the argument and value axes simultaneously, use the commonAxisSettings | constantLineStyle object.

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

NOTE: The options specified within the argumentAxis | constantLines object override the corresponding options specified within the argumentAxis | constantLineStyle object. In turn, the options specified within the argumentAxis | constantLineStyle object override the options specified within the commonAxisSettings | constantLineStyle object.

Show Example:
jQuery

In the following example, several appearance options of the argument axis constant lines are changed. These lines are drawn in the yellowgreen color with a 2-pixel width. The dash style of the lines is changed to longDash. In addition, the constant line labels are colored in lightskyblue.


                                    

                                    

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.

Show Example:
jQuery

In the following example, you can note the difference between two modes of positioning ticks and grid lines on a discrete axis. Use the drop-down list in the bottom to change the value of the discreteAxisDivisionMode option.


                                    

                                    

grid

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

Type: Object

Grid lines are the reference lines used to improve the readability of a chart's visual data. Grid lines are drawn from axis ticks throughout the entire chart. 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.

Show Example:
jQuery

In this example, the argument axis' grid lines are made visible.


                                    

                                    

hoverMode

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

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

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.
Show Example:
jQuery

To highlight a set of points, hover over one of the argument axis' labels.


                                    

                                    

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.

Show Example:
jQuery

Use the check box located in the bottom to invert the argument axis.


                                    

                                    

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

Show Example:
jQuery

In the following example, the argument axis labels are rotated by 45 degrees. In addition, an indent from the argument axis is set to 25 pixels.


                                    

                                    

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.

Show Example:
jQuery

Use the set of radio buttons located under the chart to change the argument axis' logarithmBase option at runtime.


                                    

                                    

max

Specifies the maximum value on the argument axis.

Type: Number|Date
Default Value: undefined

Use the max property to set a custom maximum value for the argument axis. You can also set a custom minimum value for the argument axis using the min property. If you do not specify these properties, the maximum and minimum values on the argument axis correspond to the maximum and minimum argument values in the chart's data.

If you need to extend the limit values for the argument axis, set the valueMarginsEnabled property to true and specify the minValueMargin and maxValueMargin properties (if the axis is continuous). In this instance, the series will be indented from the maximum and minimum axis boundaries.

Show Example:
jQuery

The following example represents how to display a part of the chart using the argument axis' min and max options.


                                    

                                    

maxValueMargin

Specifies a coefficient for determining the maximum value's margin on an axis.

Type: Number
Default Value: 0.1

When the valueMarginsEnabled property is set to true, the axis is expanded from the min and max values. This is helpful when you need to display a series with indents from the axes. For continuous axes, you can set the maximum and minimum value margins. Use the maxValueMargin property to set how much to expand the axes from the max value. Since this property value is a coefficient, you can set a value for the axis expansion without knowledge of the actual axis values. The resulting end axis value is calculated using the following formula: max + (max - min)*maxValueMargin. Assume that min is 1960 and max is 2010. If you set maxValueMargin to 0.1, the resulting end axis value will be 2015.

MaxValueMargin ChartJS

min

Specifies the minimum value on the argument axis.

Type: Number|Date
Default Value: undefined

Use the min property to set a custom minimum value for the argument axis. In addition, you can set a custom maximum value for the argument axis using the max property. If you do not specify these properties, the maximum and minimum values on the argument axis correspond to the maximum and minimum argument values in the chart's data.

If you need to extend the argument axis boundary values, set the valueMarginsEnabled property to true and specify the minValueMargin and maxValueMargin properties (if the axis is continuous). In this instance, the series will be indented from the maximum and minimum axis boundaries.

Show Example:
jQuery

The following example represents how to display a part of the chart using the argument axis' min and max options.


                                    

                                    

minValueMargin

Specifies a coefficient for determining the minimum value's margin on an axis.

Type: Number
Default Value: 0.1

When the valueMarginsEnabled property is set to true, the axis is expanded beyond the max and min values. This is helpful when you need to display the series with indents from the axes. For a continuous argument axis, you can set the maximum and minimum value margins. Use the minValueMargin property to set how much to expand the axes beyond the min value. Since this property value is a coefficient, you can set a value for the axis expansion without knowledge of the actual axis values. The resulting start axis value is calculated using the following formula: min - (max - min)*minValueMargin. Assume that min is 1960 and max is 2010. If you set minValueMargin to 0.1, the resulting start axis value will be 1955.

MinValueMargin ChartJS

opacity

Specifies the opacity of the line that represents an axis.

Type: Number
Default Value: undefined

Show Example:
jQuery

In this example, the opacity option of the argument axis is set to 1.


                                    

                                    

placeholderSize

Specifies, in pixels, the space reserved for an axis.

Type: Number
Default Value: null

The scale's height includes the space occupied by the axis labels, axis line and the space between the axis labels and axis line.

AxisPlaceholder ChartJS

position

Specifies the position of the argument axis on a chart.

Type: String
Default Value: 'bottom'
Accepted Values: 'bottom' | 'top' | 'left' | 'right'

The 'bottom' and 'top' values are appropriate when the argument axis is horizontal. The 'left' and 'right' values are appropriate when the argument axis is vertical. To make the argument axis vertical, use the chart's rotated property.

Show Example:
jQuery

In the example below, the argument axis is placed at the top of the chart using the position option.


                                    

                                    

setTicksAtUnitBeginning

Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval.

Type: Boolean
Default Value: true

This property is used when a continuous axis of the 'date-time' value type is divided. If this property is set to true, axis ticks/grid lines are set at the beginning of date-time units (months, days, years, etc.). The following examples will help you understand the logic:

Tick Interval Start Value Ticks Generated
2 hours 11 (h) : 35 (min) : 25 (s) : 10 (ms) "13 (h) : 00 (min) : 00 (s) : 00 (ms)"; "15 (h): 00 (min) : 00 (s) : 00 (ms)"; ...
2 days 6 (d) : 11 (h) : 35 (min) "8 (d) : 00 (h) : 00 (min)"; "10 (d) : 00 (h) : 00 (min)"; ...
2 months March : 13 (d) "May : 0 (d)"; "July: 0 (d)"; ...

The values that will be generated for the axis can be formatted using the format property (see Data Formatting).

Show Example:
jQuery

In the example below, you can spot the difference between two modes of arranging ticks/grid lines. Use the check box in the bottom to change the value of the setTicksAtUnitBeginning option.


                                    

                                    

strips[]

Specifies options for argument axis strips.

Type: Array

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

Show Example:
jQuery

In this example, the argument axis' strips are defined and colored in a custom color.


                                    

                                    

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.

Show Example:
jQuery

In the example below, the strip label's text is colored in blue and indented from the strip's top border by 30 pixels.


                                    

                                    

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

Show Example:
jQuery

Here, the argument axis ticks are visible with the opacity option set to 0.75.


                                    

                                    

tickInterval

Specifies an interval between axis ticks/grid lines.

Default Value: undefined
Accepted Values: 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | '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.

NOTE: The specified tick interval can be changed internally if its value leads to label overlapping. If you need to prohibit an automatic tick arrangement in this situation, specify the argumentAxis | label | overlappingBehavior | mode option.

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.

Show Example:
jQuery

In the following example, the argument axis tick interval is set to 2 days.


                                    

                                    

title

Specifies the title for the argument axis.

Type: Object

If you only wish to set the text for the axis title, assign this text to the title property directly. Set the text property and other properties of the title configuration object if you need to customize title options. For an overview of axis titles, refer to the Axis Titles topic.

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

Show Example:
jQuery

In the example below, the argument axis title text is assigned directly to the title field.


                                    

                                    

type

Specifies the required type of the argument axis.

Type: String
Default Value: undefined
Accepted Values: 'discrete' | 'continuous' | '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 positioned so that their labels do not overlap each other. In addition, you can set a custom maximum axis value (the max option), minimum axis value (the min option) and 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.

Show Example:
jQuery

This example shows the argument axis of a discrete type. Here, this axis is ordered by categories, divided using the 'crossLabels' mode and moved to the top of the chart. In addition, the grid lines of the axis are made visible.


                                    

                                    

valueMarginsEnabled

Indicates whether or not to display series with indents from axis boundaries.

Type: Boolean
Default Value: true

NOTE: This property is ignored for series of bar-like types, such as bar, stacked bar or full-stacked bar.

Additionally, if you use a continuous axis, you can specify how far to extend the axis from its maximum and minimum values. Use the axis' minValueMargin and maxValueMargin properties to do this.

Show Example:
jQuery

Use the check box in the bottom to enable/disable value margins for the argument axis.


                                    

                                    

visible

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

Type: Boolean
Default Value: false

Show Example:
jQuery

Use the check box in the bottom to change visibility of the argument axis.


                                    

                                    

width

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

Type: Number
Default Value: 1

Show Example:
jQuery

In this example, the argument axis width option is set to 3.