AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.3.1 version of this document. Switch to the 8.1.0 version to see the up to date information.

namespace anychart Improve this Doc

Core space for all anychart components.

Constants Overview

DEVELOPDefines if it is developer edition.
VERSIONCurrent version of the framework.

Functions Overview

area()Default area chart.
areaChart()Default area chart.
bar()Default bar chart.
barChart()Default bar chart.
bubble()Default bubble chart.
bubbleChart()Default bubble chart.
bullet()Creates a bullet chart.
bulletChart()Creates a bullet chart.
cartesian()Returns a chart instance with initial settings (no axes, grids, titles, legend and so on).
cartesianChart()Returns a chart instance with initial settings (no axes, grids, titles, legend and so on).
column()Default column chart.
columnChart()Default column chart.
financial()Default financial chart.
financialChart()Default financial chart.
fromJson()Creates an element by JSON config.
fromXml()Creates an element by XML config.
ganttProject()Constructor function for gantt project chart.
ganttResource()Constructor function for gantt resource chart.
licenseKey()Setter for AnyChart license key.
line()Default line chart.
lineChart()Default line chart.
marker()Default marker chart.
markerChart()Default marker chart.
onDocumentLoad()Add callback for the document load event.
onDocumentReady()Add callback for document ready event.
pie()Default line chart.
pieChart()Default line chart.
polar()Default polar chart.
radar()Default radar chart.
scatter()Returns a scatter chart instance with initial settings (axes, grids, title).

Classes Overview

anychart.SignalEventSpecial event for changes in dirty states.

Constants Description

Defines if it is developer edition.

Type: boolean

Try it:

Current version of the framework.

Type: string

Try it:

Functions Description

area

Default area chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Area chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for area series.

Try it:

areaChart

Default area chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Area chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for area series.

Try it:

bar

Default bar chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Bar chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for bar series.

Try it:

barChart

Default bar chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Bar chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for bar series.

Try it:

bubble

Default bubble chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Bubble chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for bubble series.

Try it:

bubbleChart

Default bubble chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Bubble chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for bubble series.

Try it:

bullet

Creates a bullet chart.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Bullet Chart data.

Returns:

anychart.charts.Bullet - Bullet chart.

Try it:

bulletChart

Creates a bullet chart.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Bullet Chart data.

Returns:

anychart.charts.Bullet - Bullet chart.

Try it:

cartesian

Returns a chart instance with initial settings (no axes, grids, titles, legend and so on).
Note: To get a chart with initial settings use:

Params:

Name Type Description
barChartMode boolean If true, sets the chart to Bar Chart mode, swapping default chart elements behaviour to horizontal-oriented (setting default layout to VERTICAL, swapping axes, etc).

Returns:

anychart.charts.Cartesian - Empty chart.

Try it:

cartesianChart

Returns a chart instance with initial settings (no axes, grids, titles, legend and so on).
Note: To get a chart with initial settings use:

Params:

Name Type Description
barChartMode boolean If true, sets the chart to Bar Chart mode, swapping default chart elements behaviour to horizontal-oriented (setting default layout to VERTICAL, swapping axes, etc).

Returns:

anychart.charts.Cartesian - Empty chart.

Try it:

column

Default column chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Column chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for column series.

Try it:

columnChart

Default column chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Column chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for column series.

Try it:

financial

Default financial chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Finance chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for ohlc and candlestick series.

Try it:

financialChart

Default financial chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Finance chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for ohlc and candlestick series.

Try it:

fromJson

Creates an element by JSON config.

Params:

Name Type Description
jsonConfig Object | string Config.

Returns:

* - Element created by config.

Try it:

fromXml

Creates an element by XML config.

Params:

Name Type Description
xmlConfig string | Node Config.

Returns:

* - Element created by config.

Try it:

ganttProject

Constructor function for gantt project chart.

ganttResource

Constructor function for gantt resource chart.

licenseKey

Setter for AnyChart license key.
To purchase a license proceed to Buy AnyChart page.

Params:

Name Type Description
value string Your licence key.

Returns:

string - Current licence key.

Try it:

line

Default line chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Line chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for line series.

Try it:

lineChart

Default line chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Line chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for line series.

Try it:

marker

Default marker chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Marker chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for marker series.

Try it:

markerChart

Default marker chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Marker chart data.

Returns:

anychart.charts.Cartesian - Chart with defaults for marker series.

Try it:

onDocumentLoad

Add callback for the document load event.
It is fired when the entire page loads, including its content (images, css, scripts, etc.).

Params:

Name Type Description
func function Function which will be called on document load event.
scope * Function call context.

onDocumentReady

Add callback for document ready event.
It is called when the DOM is ready, this can happen prior to images and other external content is loaded.

Params:

Name Type Description
func function Function which will called on document load event.
scope * Function call context.

pie

Default line chart.
Note: Contains predefined settings for legend and tooltip.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.

Returns:

anychart.charts.Pie - Default pie chart.

Try it:

pieChart

Default line chart.
Note: Contains predefined settings for legend and tooltip.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.

Returns:

anychart.charts.Pie - Default pie chart.

Try it:

polar

Default polar chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Marker chart data.

Returns:

anychart.charts.Polar - Chart with defaults for marker series.

Try it:

radar

Default radar chart.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Line chart data.

Returns:

anychart.charts.Radar - Chart with defaults for line series.

Try it:

scatter

Returns a scatter chart instance with initial settings (axes, grids, title).
By default creates marker series if arguments is set.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Marker chart data.

Returns:

anychart.charts.Scatter - Chart with defaults for scatter series.

Try it: