commonAxisSettings

An object defining the configuration options that are common for all axes of the dxChart widget.

Type: Object

Use this object's properties to set the options for all chart axes at once. The option values will be applied to the argument axis and all values axes, which are defined in the valueAxis array. To set a common axis option for an axis individually, use the corresponding valueAxis or argumentAxis object. Values that are set individually override their corresponding common values.

Show Example:
jQuery

Here, the color and width options are changed for both axes.


                                    

                                    

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 common color option is set to green.


                                    

                                    

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.

Show Example:
jQuery

In the following example, several appearance options of the 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 axes grid lines are made visible.


                                    

                                    

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 both axes.


                                    

                                    

label

An object defining the label configuration options that are common for all axes in the dxChart widget.

Type: Object

Axis labels represent textual values for axis ticks, which are not visible by default. Use the label object's properties to set common label options for all axes simultaneously.

To set a common option for labels of a particular axis, use the label object within the argumentAxis or valueAxis configuration object. The values that are set individually override the corresponding common values.

Show Example:
jQuery

In this example, the labels of both the argument and value axes are enlarged up to size 14.


                                    

                                    

maxValueMargin

Specifies a coefficient that determines the spacing between the maximum series point and the axis.

Type: Number
Default Value: 0.1

When margins are enabled in a chart, an axis extends slightly beyond its min and max values. It is required for preventing the cutting of parts off of the minimum and maximum series points.

By default, margins are calculated automatically and equal to half of an axis' tick interval. If you need to specify custom margins, use the minValueMargin and maxValueMargin options. These options accept coefficients that are used to calculate the actual start and end values for an axis with applied margins. The end value is calculated using the following formula.

endValue = max + (max - min) * maxValueMargin

For example, consider that min is 1960 and max is 2010. If you set the maxValueMargin option to 0.1, the axis will end in 2015.

endValue = 2010 + (2010 - 1960) * 0.1 = 2010 + 50 * 0.1 = 2010 + 5 = 2015

MaxValueMargin ChartJS

To discover how the axis' start value is calculated, refer to the minValueMargin option description.

NOTE
Margins can be added to axes of the continuous or logarithmic type only.

minorGrid

Specifies the options of the minor grid.

Type: Object

In addition to the major grid built on major ticks, the dxChart 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 horizontal and vertical lines simultaneously. To change the appearance of horizontal or vertical lines 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
If you try to display the minor grid without the major grid, the result may be disappointing. Hence, 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 dxChart 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.

minValueMargin

Specifies a coefficient that determines the spacing between the minimum series point and the axis.

Type: Number
Default Value: undefined

When margins are enabled in a chart, an axis extends slightly beyond its min and max values. It is required for preventing the cutting of parts off of the minimum and maximum series points.

By default, margins are calculated automatically and equal to half of an axis' tick interval. If you need to specify custom margins, use the minValueMargin and maxValueMargin options. These options accept coefficients that are used to calculate the actual start and end values for an axis with applied margins. The start value is calculated using the following formula.

startValue = min - (max - min) * minValueMargin

For example, consider that min is 1960 and max is 2010. If you set the minValueMargin option to 0.1, the axis will start in 1955.

startValue = 1960 - (2010 - 1960) * 0.1 = 1960 - 50 * 0.1 = 1960 - 5 = 1955

MinValueMargin ChartJS

To discover how the axis' end value is calculated, refer to the maxValueMargin option description.

NOTE
Margins can be added to axes of the continuous or logarithmic type only.

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 axes 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

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.


                                    

                                    

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 labels' text is colored in blue.


                                    

                                    

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 axes ticks are visible.


                                    

                                    

title

An object defining the title configuration options that are common for all axes in the dxChart widget.

Type: Object

Use the title object's properties to set common title options for all axes simultaneously.

To set an individual value for a common title option, use the title object within the argumentAxis or the valueAxis configuration object. The values that are set individually override the corresponding common values.

Show Example:
jQuery

In this example, the margin option of the axis titles is set 20.


                                    

                                    

valueMarginsEnabled

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

Type: Boolean
Default Value: true

NOTE: When series of bar-like types, such as bar, stacked bar or full-stacked bar, are used, setting this property to true adds margins to the top and bottom of the chart's plot only.

Additionally, if you use continuous or logarithmic axes, you can specify how far to extend them from their 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 both axes.


                                    

                                    

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 axes visibility.


                                    

                                    

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 axes' width option is set to 3.