A chart can have from 0 axes (pie chart) to multiples.
A chart can have from 0 axes (pie chart) to multiples. In a normal, single series cartesian chart, there is one X axis and one Y axis.
The X axis or axes are referenced by chart.xAxis
, which is an array of Axis objects. If there is only one axis, it can be referenced through chart.xAxis[0]
, and multiple axes have increasing indices. The same pattern goes for Y axes.
If you need to get the axes from a series object, use the series.xAxis
andseries.yAxis
properties. These are not arrays, as one series can only be associated to one X and one Y axis.
A third way to reference the axis programmatically is by id. Add an id in the axis configuration options, and get the axis by chart.get(id)
.
Configuration options for the axes are given in options.xAxis and options.yAxis.
The chart object is the JavaScript object representing a single chart in the web page.The pointer to your chart object is returned when a chart is created using the Highcharts.Chart()
constructor:
var chart1 = new Highcharts.Chart(options);
The chart object is the JavaScript object representing a single chart in the web page.The pointer to your chart object is returned when a chart is created using the Highcharts.Chart()
constructor:
var chart1 = new Highcharts.Chart(options);
The Element class is a JavaScript wrapper for SVG elements used in the rendering layer of Highchart.
The Element class is a JavaScript wrapper for SVG elements used in the rendering layer of Highchart. Combined with the Renderer object, these elements allows freeform annotation in the charts or even in your HTML pages without creating a chart at all.
The namespace under which all other Highcharts variables are assembled is called Highcharts
.
The namespace under which all other Highcharts variables are assembled is called Highcharts
.
var chart1 = new Highcharts.Chart(options);
The Point object is the JavaScript representation of each data point
The Point object is the JavaScript representation of each data point
The object can be accessed in a number of ways. In all point event handlers the point object is this
. In the series
object all the points are accessed by the series.data
array.
Another way to reference the point programmatically is by id. Add an id in the point configuration options, and get the point object by chart.get(id)
.
Allows direct access to the Highcharts rendering layer in order to draw primitive shapes like circles, rectangles,paths or text directly on a chart, or independent from any chart.
Allows direct access to the Highcharts rendering layer in order to draw primitive shapes like circles, rectangles,paths or text directly on a chart, or independent from any chart. The Renderer represents a wrapper object for SVGin modern browsers and VML in IE < 8.
An existing chart's renderer can be accessed through chart.renderer
. To create a renderer independent from a chart, use var renderer = new Highcharts.Renderer(parentNode, width, height);
where parentNode is the HTML element where you want to add it.
The Renderer's methods are chained wherever possible, so you can initiate an element then call for example attr
and css
and add
on that element in one statement.
Annotating a chart programmatically, independent SVG/VML drawing
The Series object is the JavaScript representation of each line, area series, pie etc.
The Series object is the JavaScript representation of each line, area series, pie etc.
The object can be accessed in a number of ways. All series and point event handlers give a reference to the series object. The chart
object has a series
property that is a collection of all the chart's series. The point
objects also have the same reference.
Another way to reference the series programmatically is by id. Add an id in the series configuration options, and get the series object by chart.get(id)
.
Configuration options for the series are given in three levels. Options for all series in a chart are given in the plotOptions.series object. Then options for all series of a specific type are given in the plotOptions of that type, for example plotOptions.line. Next, options for one single series are given in the series array.