constantLines[]

Defines an array of the argument axis constant lines.

Type: Array
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.

Show Example:
jQuery

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


                                    

                                    

color

Specifies a color for a constant line.

Type: String
Default Value: '#000000'

This option supports the following colors.

Show Example:
jQuery

In this example, each argument axis constant line is drawn in a different color.


                                    

                                    

dashStyle

Specifies a dash style for a constant line.

Type: String
Default Value: 'solid'
Accepted Values: 'solid' | 'longDash' | 'dash' | 'dot'

The following values are available.

  • solid
    Displays a solid, continuous constant line.
  • longDash
    Displays a constant line using long dashes.
  • dash
    Displays a constant line using dashes.
  • dot
    Displays a constant line using dots.
  • Any combination of 'longDash', 'dash' and 'dot'
    Displays a constant line by repeating the specified combination. For instance, 'dashdotdash'.

When using the widget as an ASP.NET MVC Control, specify this option using the DashStyle enum. This enum accepts the following values: Solid, LongDash, Dash and Dot.

Show Example:
jQuery

In the following example, each argument axis constant line is drawn in different dash styles.


                                    

                                    

label

An object defining constant line label options.

Type: Object

A constant line label shows information on the constant line. You can configure label appearance using the label object. Within this object, you can set font options, a position and text using corresponding fields. In addition, you can specify the horizontal and vertical alignments for the label.

You can set the label options for all the argument axis constant lines simultaneously. For this purpose, use the argumentAxis.constantLineStyle.label object. Note that the options that are set within the argumentAxis.constantLine.label object override the corresponding options that are set within the argumentAxis.constantLineStyle.label object.

Show Example:
jQuery

In the following example, several options for the argument axis constant line labels are changed. All labels are colored differently. In addition, the "2015" label is displayed with the altered text.


                                    

                                    

value

Specifies a value to be displayed by a constant line.

Default Value: undefined

Show Example:
jQuery

In this example, the value option is used to specify the values that the argument axis constant lines indicate.


                                    

                                    

width

Specifies a constant line width in pixels.

Type: Number
Default Value: 1

Show Example:
jQuery

In the following example, each argument axis constant line has a different width.