Y-Axis Markers

Overview

AnyChart Stock supports "Axis Markers", which allow showing trends, limits, and other important information.

The current version supports two types of markers:

Any marker can have several labels positioned by the Y-axis marker. The illustration below demonstrates the both marker types:

Axis Markers are bound to the Y-axis and can be used with both primary and extra Y-axes; you can add any number of the markers to a chart.

Here is a sample XML that shows where the marker configuration parameters are to be placed:

XML/JSON Syntax
Plain code
01 <?xml version="1.0" encoding="UTF-8"?>
02 <stock xmlns="http://anychart.com/products/stock/schemas/1.9.0/schema.xsd">
03   <settings>
04     <charts>
05       <chart>
06         <value_axes>
07           <primary>
08             <axis_markers>
09               <line_markers>
10                 <line_marker value="1600" />
11               </line_markers>
12               <range_markers>
13                 <range_marker low_value="100" high_value="950" />
14               </range_markers>
15             </axis_markers>
16           </primary>
17           <extra>
18             <axis id="extra1">
19               <axis_markers>
20                 <line_markers>
21                   <line_marker value="1600" />
22                 </line_markers>
23                 <range_markers>
24                   <range_marker low_value="100" high_value="950" />
25                 </range_markers>
26               </axis_markers>
27             </axis>
28           </extra>
29         </value_axes>
30       </chart>
31     </charts>
32   </settings>
33 </stock>
01{
02  settings: {
03    charts: [
04      {
05        valueAxes: {
06          primary: {
07            axisMarkers: {
08              lineMarkers: [
09                {
10                  value: 1600
11                }
12              ],
13              rangeMarkers: [
14                {
15                  lowValue: 100,
16                  highValue: 950
17                }
18              ]
19            }
20          },
21          extra: [
22            {
23              id: "extra1",
24              axisMarkers: {
25                lineMarkers: [
26                  {
27                    value: 1600
28                  }
29                ],
30                rangeMarkers: [
31                  {
32                    lowValue: 100,
33                    highValue: 950
34                  }
35                ]
36              }
37            }
38          ]
39        }
40      }
41    ]
42  }
43}

As you can see in the sample, Line markers are defined in the <line_markers> node, and Range Markers - in the <range_markers> node. You can also see that they both can be bound to the primary and extra Y-axes.

to top

Line Markers

A line marker displays one value on the Y-axis in the form of a line and/or a set of labels.

Adding Line Markers

When creating a line marker, you should specify one exact value on the axis it is bound to. The number of markers is not limited, and they all are defined with a list of the <line_marker> nodes.

This sample XML demonstrates the definition of three line markers on the primary Y-axis:

XML/JSON Syntax
Plain code
01 <?xml version="1.0" encoding="UTF-8"?>
02 <stock xmlns="http://anychart.com/products/stock/schemas/1.9.0/schema.xsd">
03   <settings>
04     <charts>
05       <chart>
06         <value_axes>
07           <primary>
08             <axis_markers>
09               <line_markers>
10                 <line_marker value="1600" />
11                 <line_marker value="2100" />
12                 <line_marker value="2566.22" />
13               </line_markers>
14             </axis_markers>
15           </primary>
16         </value_axes>
17       </chart>
18     </charts>
19   </settings>
20 </stock>
01{
02  settings: {
03    charts: [
04      {
05        valueAxes: {
06          primary: {
07            axisMarkers: {
08              lineMarkers: [
09                {
10                  value: 1600
11                },
12                {
13                  value: 2100
14                },
15                {
16                  value: 2566.22
17                }
18              ]
19            }
20          }
21        }
22      }
23    ]
24  }
25}

The value attribute sets the value on the Y-axis the marker is bound to.

The live sample below demonstrates the three line markers in action:

Live Sample:  Y-Axis Markers - Line Marker

These lines use the default settings, so they look similar; however, you can customize them. The customization is going to be described right next.

to top

Line Settings

A line marker can be drawn as solid or dashed line. The sample XML below demonstrates the configuration of them both:

XML/JSON Syntax
Plain code
01 <?xml version="1.0" encoding="UTF-8"?>
02 <stock xmlns="http://anychart.com/products/stock/schemas/1.9.0/schema.xsd">
03   <settings>
04     <charts>
05       <chart>
06         <value_axes>
07           <primary>
08             <axis_markers>
09               <line_markers>
10                 <line_marker value="1800">
11                   <line thickness="2" color="DarkRed" dashed="true" dash_length="10" dash_space="10" />
12                 </line_marker>
13                 <line_marker value="2600">
14                   <line thickness="2" color="Green" dashed="false" opacity="0.5" />
15                 </line_marker>
16               </line_markers>
17             </axis_markers>
18           </primary>
19         </value_axes>
20       </chart>
21     </charts>
22   </settings>
23 </stock>
01{
02  settings: {
03    charts: [
04      {
05        valueAxes: {
06          primary: {
07            axisMarkers: {
08              lineMarkers: [
09                {
10                  value: 1800,
11                  line: {
12                    thickness: 2,
13                    color: "DarkRed",
14                    dashed: true,
15                    dashLength: 10,
16                    dashSpace: 10
17                  }
18                },
19                {
20                  value: 2600,
21                  line: {
22                    thickness: 2,
23                    color: "Green",
24                    dashed: false,
25                    opacity: 0.5
26                  }
27                }
28              ]
29            }
30          }
31        }
32      }
33    ]
34  }
35}

As you can see in the sample, the line is configured in the <line> subnode. To make the line dashed, you are to set the dashed attribute to 'true' and (optionally) define the dash_length and dash_space.

The live sample below demonstrates the above configuration in action:

Live Sample:  Y-Axis Markers - Line Settings

Learn more about line settings for line markers in XML Reference.

to top

Labels

An axis marker can have an unlimited number of labels - depending on your task, you can add one, two, three or more labels placed in different areas, with different text and appearance.

Labels are defined by the set of the <label> nodes. For example:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label />
04     <label />
05     <label />
06   </labels>
07 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {},
05    {},
06    {}
07  ]
08}

Below follows the description of label configuration.

Positioning

A label can be placed on any position relative to the marker line inside the data plotting area. Be default, labels are placed above the marker line to the right of the plotting area.

The following attributes of the <label> node are used for defining label position:

Attribute Possible Values Description
anchor Left
Center
Right
Sets label anchor.
valign Top
Center
Bottom
Sets label vertical alignment.
halign Left
Center
Right
Sets label horizontal alignment.
x_padding Any number Sets label X padding.
y_padding Any number Sets label Y padding.

Here is a sample XML that demonstrates defining a label position:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label anchor="Center" valign="Top" halign="Center" x_padding="0" y_padding="4" />
04   </labels>
05 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {
05      anchor: "Center",
06      valign: "Top",
07      halign: "Center",
08      xPadding: 0,
09      yPadding: 4
10    }
11  ]
12}

to top

Text and Tokens

To define a label text, use the <format> node, you can use either a static text or a {%Value} token, which would be replaced with the actual value set in the value attribute of <line_marker> node.

Here is a sample XML that shows how to define a label text:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label>
04       <format><![CDATA[Value: {%Value}]]></format>
05     </label>
06   </labels>
07 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {
05      format: "Value: {%Value}"
06    }
07  ]
08}

With this formatting, the label would display the following text: "Value: 1800.00". The {%Value} token can be formatted just as any other token - see Number Formatting for more information.

to top

Font

Label font is configured in the typical <font> node.

There are two major options for configuring label font:

This XML sample demonstrates how to define font settings with the <font> node:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label>
04       <font family="Verdana" size="9" color="#335533" bold="true" />
05     </label>
06   </labels>
07 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {
05      font: {
06        family: "Verdana",
07        size: 9,
08        color: "#335533",
09        bold: true
10      }
11    }
12  ]
13}

Another example - doing the same with the HTML tag:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label>
04       <font render_as_html="true" />
05       <format><![CDATA[[Value: <b><font color="#883333">{%Value}</font></b>]]></format>
06     </label>
07   </labels>
08 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {
05      font: {
06        renderAsHtml: true
07      },
08      format: "[Value: <b><font color=\"#883333\">{%Value}</font></b>"
09    }
10  ]
11}

Find out more about font settings and HTML formatting in Font Configuration.

to top

Background

You can enable background to make the text in a label easier to read. Background is configured in the <background> node.

The sample XML below demonstrates how to define label background:

XML/JSON Syntax
Plain code
01 <line_marker value="1800">
02   <labels>
03     <label anchor="Right" x_padding="5" y_padding="5" valign="Top" halign="Left">
04       <format><![CDATA[Upper Limit: {%Value}]]></format>
05       <font family="Tahoma" size="9" bold="true" color="#333333" />
06       <background enabled="true">
07         <fill enabled="true" type="Solid" color="#FEFFE6" opacity="1" />
08         <corners type="Rounded" all="4" />
09         <border enabled="true" color="#CBAF87" />
10         <inside_margin left="10" />
11       </background>
12     </label>
13   </labels>
14 </line_marker>
01{
02  value: 1800,
03  labels: [
04    {
05      anchor: "Right",
06      xPadding: 5,
07      yPadding: 5,
08      valign: "Top",
09      halign: "Left",
10      format: "Upper Limit: {%Value}",
11      font: {
12        family: "Tahoma",
13        size: 9,
14        bold: true,
15        color: "#333333"
16      },
17      background: {
18        enabled: true,
19        fill: {
20          enabled: true,
21          type: "Solid",
22          color: "#FEFFE6",
23          opacity: 1
24        },
25        corners: {
26          type: "Rounded",
27          all: 4
28        },
29        border: {
30          enabled: true,
31          color: "#CBAF87"
32        },
33        insideMargin: {
34          left: 10
35        }
36      }
37    }
38  ]
39}

to top

Sample with All Settings

Take a look at the sample below that uses all the settings described above, including HTML text formatting:

Live Sample:  Y-Axis Markers - Line Marker with Label

to top

Range Markers

A range marker is bound to two Y-axis values: high and low. It appears as two lines and a filler between them. Just as line marker, range marker can have an unlimited number of labels, but these labels have more anchors.

Adding Range Markers

When adding a range marker, you should define the limits that you want to show on the plot. The number of markers is not limited, and they all are defined in the list of the <range_marker> nodes .

This sample XML demonstrates adding three range markers to the primary axis:

XML/JSON Syntax
Plain code
01 <?xml version="1.0" encoding="UTF-8"?>
02 <stock xmlns="http://anychart.com/products/stock/schemas/1.9.0/schema.xsd">
03   <settings>
04     <charts>
05       <chart>
06         <value_axes>
07           <primary>
08             <axis_markers>
09               <range_markers>
10                 <range_marker low_value="500" high_value="700" />
11                 <range_marker low_value="700" high_value="1000" />
12                 <range_marker low_value="1000" high_value="1800" />
13               </range_markers>
14             </axis_markers>
15           </primary>
16         </value_axes>
17       </chart>
18     </charts>
19   </settings>
20 </stock>
01{
02  settings: {
03    charts: [
04      {
05        valueAxes: {
06          primary: {
07            axisMarkers: {
08              rangeMarkers: [
09                {
10                  lowValue: 500,
11                  highValue: 700
12                },
13                {
14                  lowValue: 700,
15                  highValue: 1000
16                },
17                {
18                  lowValue: 1000,
19                  highValue: 1800
20                }
21              ]
22            }
23          }
24        }
25      }
26    ]
27  }
28}

As you can see here, the limits of the range are set by the low_value and high_value attributes.

Here is a live sample for a range marker between 1600 and 2600:

Live Sample:  Y-Axis Markers - Range Marker

This is what a range marker looks like by default; you can tune up the visual settings to customize its appearance. The customization is going to be covered right next.

to top

Visual Settings

A range marker consists of three elements:

The sample XML below demonstrates the configuration of them both:

The lines can be either solid or dashed; the filler can be solid or gradient. The sample XML below demonstrates how to configure the appearance of a range marker:

XML/JSON Syntax
Plain code
01 <range_marker low_value="800" high_value="1800">
02   <low_line color="Red" dashed="true" dash_length="3" dash_space="3" />
03   <high_line color="Red" dashed="true" dash_length="3" dash_space="3" />
04   <fill color="Yellow" opacity="0.1" />
05 </range_marker>
01{
02  lowValue: 800,
03  highValue: 1800,
04  lowLine: {
05    color: "Red",
06    dashed: true,
07    dashLength: 3,
08    dashSpace: 3
09  },
10  highLine: {
11    color: "Red",
12    dashed: true,
13    dashLength: 3,
14    dashSpace: 3
15  },
16  fill: {
17    color: "Yellow",
18    opacity: 0.1
19  }
20}

The live sample demonstrates two range markers with different visual settings. The first range has a solid filler, while the second one - gradient:

Live Sample:  Y-Axis Markers - Range Visual Settings

Find out more about fill configuration in Background Tutorial and XML Reference.

to top

Labels

An axis marker can have an unlimited number of labels - depending on your task, you can add one, two, three or more labels placed in different areas, with different text and appearance.

Labels are defined by the set of the <label> nodes. For example:

XML/JSON Syntax
Plain code
01 <range_marker low_value="1800" high_value="2600">
02   <labels>
03     <label />
04     <label />
05     <label />
06   </labels>
07 </range_marker>
01{
02  lowValue: 1800,
03  highValue: 2600,
04  labels: [
05    {},
06    {},
07    {}
08  ]
09}

Below follows the description of label customization.

Positioning

A label can be placed on any position relative to the marker line inside the data plotting area. Be default, labels are placed above the marker line to the right of the plotting area.

The following attributes of the <label> node are used for defining label position:

Attribute Possible Values Description
anchor LeftTop
RightTop
LeftBottom
RightBottom
LeftCenter
RightCenter
TopCenter
BottomCenter
Center
Sets label anchor.
valign Top
Center
Bottom
Sets label vertical alignment.
halign Left
Center
Right
Sets label horizontal alignment.
x_padding Any number Sets label X padding.
y_padding Any number Sets label Y padding.

Here is a sample XML that demonstrates defining a label position:

XML/JSON Syntax
Plain code
01 <range_marker low_value="1800" high_value="2600">
02   <labels>
03     <label anchor="RightTop" valign="Bottom" halign="Left" x_padding="4" y_padding="4" />
04   </labels>
05 </range_marker>
01{
02  lowValue: 1800,
03  highValue: 2600,
04  labels: [
05    {
06      anchor: "RightTop",
07      valign: "Bottom",
08      halign: "Left",
09      xPadding: 4,
10      yPadding: 4
11    }
12  ]
13}

With such settings label is placed in the top right corner of the area.

to top

Text and Tokens

To define a label text, use the <format> node, you can use either a static text or the {%LowValue} and {%HighValue} tokens, which would be replaced with the actual value set in the low_value and high_value attributes of the <range_marker> node.

Here is a sample XML that shows how to define a label text:

XML/JSON Syntax
Plain code
01 <range_marker low_value="1800" high_value="2600">
02   <labels>
03     <label>
04       <format><![CDATA[Range: {%LowValue} - {%HighValue}]]></format>
05     </label>
06   </labels>
07 </range_marker>
01{
02  lowValue: 1800,
03  highValue: 2600,
04  labels: [
05    {
06      format: "Range: {%LowValue} - {%HighValue}"
07    }
08  ]
09}

With this formatting, the label would display the following text: "Range: 1800.00 - 2600.00". The {%LowValue} and {%HighValue} tokens can be formatted just as any other token - see Number Formatting for more information.

to top

Font

Label font is configured in the typical <font> node.

There are two major options for configuring label font:

This XML sample demonstrates defining font settings with the <font> node:

XML/JSON Syntax
Plain code
01 <range_marker low_value="1800" high_value="2600">
02   <labels>
03     <label>
04       <font family="Verdana" size="9" color="#335533" bold="true" />
05     </label>
06   </labels>
07 </range_marker>
01{
02  lowValue: 1800,
03  highValue: 2600,
04  labels: [
05    {
06      font: {
07        family: "Verdana",
08        size: 9,
09        color: "#335533",
10        bold: true
11      }
12    }
13  ]
14}

Another example - doing the same with the HTML tag:

XML/JSON Syntax
Plain code
01 <range_marker low_value="1800" high_value="2600">
02   <labels>
03     <label>
04       <font render_as_html="true" />
05       <format><![CDATA[Range: <b><font color="#883333">{%LowValue} - {%HighValue}</font></b>]]></format>
06     </label>
07   </labels>
08 </range_marker>
01{
02  lowValue: 1800,
03  highValue: 2600,
04  labels: [
05    {
06      font: {
07        renderAsHtml: true
08      },
09      format: "Range: <b><font color=\"#883333\">{%LowValue} - {%HighValue}</font></b>"
10    }
11  ]
12}

Find out more about font settings and HTML formatting in Font Configuration.

to top

Background

You can enable background to make the text in a label easier to read. Background is configured in the <background> node.

The sample XML below demonstrates how to define label background:

XML/JSON Syntax
Plain code
01 <range_marker low_value="800" high_value="1800">
02   <labels>
03     <label anchor="RightCenter" x_padding="5" y_padding="0" valign="Center" halign="Left">
04       <format><![CDATA[Range: {%LowValue} - {%HighValue}]]></format>
05       <font family="Tahoma" size="9" bold="true" color="#333333" />
06       <background enabled="true">
07         <fill enabled="true" type="Solid" color="#FEFFE6" opacity="1" />
08         <corners type="Rounded" all="4" />
09         <border enabled="true" color="#CBAF87" />
10         <inside_margin left="10" />
11       </background>
12     </label>
13   </labels>
14 </range_marker>
01{
02  lowValue: 800,
03  highValue: 1800,
04  labels: [
05    {
06      anchor: "RightCenter",
07      xPadding: 5,
08      yPadding: 0,
09      valign: "Center",
10      halign: "Left",
11      format: "Range: {%LowValue} - {%HighValue}",
12      font: {
13        family: "Tahoma",
14        size: 9,
15        bold: true,
16        color: "#333333"
17      },
18      background: {
19        enabled: true,
20        fill: {
21          enabled: true,
22          type: "Solid",
23          color: "#FEFFE6",
24          opacity: 1
25        },
26        corners: {
27          type: "Rounded",
28          all: 4
29        },
30        border: {
31          enabled: true,
32          color: "#CBAF87"
33        },
34        insideMargin: {
35          left: 10
36        }
37      }
38    }
39  ]
40}

to top

Sample with All Settings

Take a look at the sample below that uses all the settings described above, including HTML text formatting:

Live Sample:  Y-Axis Markers - Range Marker with Labels

to top

Force Markers to Affect Scale Range

By default, markers bound to an axis do not affect the scale minimum and maximum. If the scale changes because of zooming or scrolling, and the values get out of the range - they would not be shown.

If you need to show the range and its labels no matter what happens with the data, you need to use the special option that includes range limits in the auto-calculation of the scale.

That is the affects_scale_range attribute, which should be set to true to include marker value (or limits) in the scale auto-calculations. Here is a sample XML that demonstrates including two markers into the calculation:

XML/JSON Syntax
Plain code
01 <chart>
02   <value_axes>
03     <primary>
04       <axis_markers>
05         <line_markers>
06           <line_marker value="2500" affects_scale_range="true" />
07         </line_markers>
08         <range_markers>
09           <range_marker low_value="800" high_value="1800" affects_scale_range="true" />
10         </range_markers>
11       </axis_markers>
12     </primary>
13   </value_axes>
14 </chart>
01{
02  valueAxes: {
03    primary: {
04      axisMarkers: {
05        lineMarkers: [
06          {
07            value: 2500,
08            affectsScaleRange: true
09          }
10        ],
11        rangeMarkers: [
12          {
13            lowValue: 800,
14            highValue: 1800,
15            affectsScaleRange: true
16          }
17        ]
18      }
19    }
20  }
21}

The live sample below demonstrates the axis markers always shown on the chart:

Live Sample:  Y-Axis Markers - Force Markers to Affect Scale Range

to top

Binding to series values

Axis marker can contain not only some static text, but some live data from the series, for example: display the last closing price on the axis.

Sample XML/JSON snippet with line axis marker bound to Close value of Line series:

XML/JSON Syntax
Plain code
01 <chart>
02   <series_list>
03     <series type="Line" data_provider="dp1" id="idSeriesA">
04       <name><![CDATA[Series A]]></name>
05     </series>
06   </series_list>
07   <value_axes>
08     <primary>
09       <axis_markers>
10         <line_markers>
11           <line_marker value_mode="Bound" series_id="idSeriesA" value_token="{%Close.LastVisible}" />
12         </line_markers>
13       </axis_markers>
14     </primary>
15   </value_axes>
16 </chart>
01{
02  seriesList: [
03    {
04      type: "Line",
05      dataProvider: "dp1",
06      id: "idSeriesA",
07      name: "Series A"
08    }
09  ],
10  valueAxes: {
11    primary: {
12      axisMarkers: {
13        lineMarkers: [
14          {
15            valueMode: "Bound",
16            seriesId: "idSeriesA",
17            valueToken: "{%Close.LastVisible}"
18          }
19        ]
20      }
21    }
22  }
23}

As you can see, to use binding you have to set value_mode to Bound, set id of series in series_id attribute and set value_token to which this marker is bound.

value_token defines to which value axis marker is bound, tokens that can be used here are the same ones you use in legend or tooltips. You can read about tokens at: Legend Series Labels: Tokens.

You can use custom fields from data provider and the following standard tokens: {%Open}, {%High}, {%Low}, {%Close}, {%Volume} and {%Value}.

For these tokens you can use {*.First}, {*.Last}, {*.FirstVisible}, {*.LastVisible}, {*.Min}, {*.Max}, {*.MinVisible} and {*.MaxVisible} properties.

Live sample below shows line axis marker bound to the last visible value of Line series - it uses {%Value} token, scroll through the chart to see how marker follows the value:

Live Sample:  Y-Axis Markers - Binding to Line Series

Another live sample shows marker bound to last visible value, but it uses {%Close} token:

Live Sample:  Y-Axis Markers - Binding to Candlestick Series

And a sample with line axis markers bound to Money Flow Index(MFI) technical indicator series:

Live Sample:  Y-Axis Markers - Binding to Technical Indicator

to top

Default Settings

If you use a lot of line or range markers with identical visual or label settings, it is better to use default settings to avoid settings duplication.

You can set default settings for all axis markers of Y axis in:

Sample XML below shows how to set defaults for all markers:

XML/JSON Syntax
Plain code
01 <chart>
02   <value_axes>
03     <primary>
04       <axis_markers>
05         <line_marker_defaults affects_scale_range="true">
06           <line color="DarkRed" dashed="true" thickness="2" pixel_hinting="true" />
07           <labels>
08             <label anchor="Right" valign="Center" halign="Left" x_padding="10">
09               <format><![CDATA[{%Value}]]></format>
10               <font family="Verdana" bold="true" color="#333333" />
11               <background enabled="true">
12                 <fill color="#FFFFFF" opacity="0.7" />
13               </background>
14             </label>
15           </labels>
16         </line_marker_defaults>
17         <range_marker_defaults affects_scale_range="true">
18           <high_line color="DarkRed" dashed="true" thickness="2" pixel_hinting="true" />
19           <low_line color="DarkRed" dashed="true" thickness="2" pixel_hinting="true" />
20           <fill color="DarkRed" opacity="0.1" />
21           <labels>
22             <label anchor="Center" valign="Center" halign="Center" x_padding="0" y_padding="0">
23               <font family="Verdana" color="#333333" bold="true" />
24               <format><![CDATA[{%LowValue} - {%HighValue}]]></format>
25               <background enabled="true">
26                 <fill color="#FFFFFF" opacity="0.7" />
27               </background>
28             </label>
29           </labels>
30         </range_marker_defaults>
31       </axis_markers>
32     </primary>
33   </value_axes>
34 </chart>
01{
02  valueAxes: {
03    primary: {
04      axisMarkers: {
05        lineMarkerDefaults: {
06          affectsScaleRange: true,
07          line: {
08            color: "DarkRed",
09            dashed: true,
10            thickness: 2,
11            pixelHinting: true
12          },
13          labels: [
14            {
15              anchor: "Right",
16              valign: "Center",
17              halign: "Left",
18              xPadding: 10,
19              format: "{%Value}",
20              font: {
21                family: "Verdana",
22                bold: true,
23                color: "#333333"
24              },
25              background: {
26                enabled: true,
27                fill: {
28                  color: "#FFFFFF",
29                  opacity: 0.7
30                }
31              }
32            }
33          ]
34        },
35        rangeMarkerDefaults: {
36          affectsScaleRange: true,
37          highLine: {
38            color: "DarkRed",
39            dashed: true,
40            thickness: 2,
41            pixelHinting: true
42          },
43          lowLine: {
44            color: "DarkRed",
45            dashed: true,
46            thickness: 2,
47            pixelHinting: true
48          },
49          fill: {
50            color: "DarkRed",
51            opacity: 0.1
52          },
53          labels: [
54            {
55              anchor: "Center",
56              valign: "Center",
57              halign: "Center",
58              xPadding: 0,
59              yPadding: 0,
60              font: {
61                family: "Verdana",
62                color: "#333333",
63                bold: true
64              },
65              format: "{%LowValue} - {%HighValue}",
66              background: {
67                enabled: true,
68                fill: {
69                  color: "#FFFFFF",
70                  opacity: 0.7
71                }
72              }
73            }
74          ]
75        }
76      }
77    }
78  }
79}

Live sample below shows how defaults for axis markers can be set and how certain marker settings can be reset:

Live Sample:  Y-Axis Markers - Using Defaults

to top