Top
You are looking at an outdated 7.11.1 version of this document. Switch to the 8.0.1 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

appendTheme()Append theme for anychart globally.
area()Creates and returns an Area Chart.
area3d()Creates and returns an Area 3D Chart.
bar()Creates and returns a Bar Chart.
bar3d()Creates and returns a Bar 3D Chart.
box()Creates and returns a Box Chart.
bubble()Creates and returns a Bubble Chart.
bubbleMap()Creates and returns a Bubble Map.
bullet()Creates and returns a Bullet Chart.
cartesian()Creates and returns a Cartesian chart.
cartesian3d()Creates and returns a Cartesian 3D chart.
choropleth()Creates and returns a Choropleth Map.
column()Creates and returns a Column Chart.
column3d()Creates and returns an Column 3D Chart.
connector()Creates and returns a Connector Map.
financial()Creates and returns a Financial Chart.
fromJson()Creates an element by JSON config.
fromJsonFile()Creates a chart from JSON configuration.
fromXml()Creates an element by XML config.
fromXmlFile()Creates a chart using XML configuration.
funnel()Creates and returns a Funnel Chart.
ganttProject()Creates and returns a Gantt Project Chart.
ganttResource()Creates and returns a Gantt Resource Chart.
ganttToolbar()Constructor function for gantt toolbar.
heatMap()Creates and returns a Heat Map.
licenseKey()Setter for AnyChart license key.
line()Creates and returns a Line Chart.
map()Creates and returns a Map.
marker()Creates and returns a Marker Chart.
markerMap()Creates and returns a Marker Map.
onDocumentLoad()Add callback for the document load event.
onDocumentReady()Add callback for document ready event.
pert()Creates and returns a Pert Chart.
pie()Creates and returns a Pie Chart.
pie3d()Creates and returns a 3D Pie Chart.
polar()Creates and returns a Polar Chart.
pyramid()Creates and returns a Pyramid Chart.
radar()Creates and returns a Radar chart.
scatter()Creates and returns a Scatter Chart.
seatMap()Creates and returns a Seat map.
sparkline()Creates and returns a Sparkline Chart.
stock()Creates and returns a Stock Chart.
theme()Sets the theme for or gets the current theme.
treeMap()Creates and returns a Tree Map.

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

appendTheme

Append theme for anychart globally.
This method applies the theme or theme settings over the existing theme.

Params:

Name Type Description
value string | Object Object with theme settings or name of the theme.

Try it:

area

Creates and returns an Area Chart. Each passed parameter is considered as a set of data which is to become a base for the Area Series. To create an Area Chart with no predefined settings, see anychart#cartesian

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:

area3d

Creates and returns an Area 3D Chart. Each passed parameter is considered as a set of data which is to become a base for the Area Series.

Params:

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

Returns:

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

Try it:

bar

Creates and returns a Bar Chart. Each passed parameter is considered as a set of data which is to become a base for the Bar Series. To create an Bar Chart with no predefined settings, see anychart#cartesian

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:

bar3d

Creates and returns a Bar 3D Chart. Each passed parameter is considered as a set of data which is to become a base for the Bar Series.

Params:

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

Returns:

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

Try it:

box

Creates and returns a Box Chart. Each passed parameter is considered as a set of data which is to become a base for the Box Series. To create an Box Chart with no predefined settings, see anychart#cartesian

Params:

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

Returns:

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

Try it:

bubble

Creates and returns a Bubble Chart. Each passed parameter is considered as a set of data which is to become a base for the Bubble Series. To create an Bubble Chart with no predefined settings, see anychart#scatter

Params:

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

Returns:

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

Try it:

bubbleMap

Creates and returns a Bubble Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Bubble Map.

Returns:

anychart.charts.Map - New map instance with a set of predefined settings suitable for bubble series.

Try it:

bullet

Creates and returns 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

Creates and returns a Cartesian chart. Has no predefined settings such as axes, grids, legends settings, etc.

Returns:

anychart.charts.Cartesian - Empty chart.

Try it:

cartesian3d

Creates and returns a Cartesian 3D chart. Has no predefined settings such as grids, legends, titles settings, etc.

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.Cartesian3d - Empty chart.

Try it:

choropleth

Creates and returns a Choropleth Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Choropleth Map.

Returns:

anychart.charts.Map - New map instance with a set of predefined settings suitable for choropleth series.

Try it:

column

Creates and returns a Column Chart. Each passed parameter is considered as a set of data which is to become a base for the Column Series. To create an Column Chart with no predefined settings, see anychart#cartesian

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:

column3d

Creates and returns an Column 3D Chart. Each passed parameter is considered as a set of data which is to become a base for the Column Series.

Params:

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

Returns:

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

Try it:

connector

Creates and returns a Connector Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Connector Map.

Returns:

anychart.charts.Map - New map instance with a set of predefined settings suitable for connector series.

Try it:

financial

Creates and returns a Financial Chart. Each passed parameter is considered as a set of data which is to become a base for the Financial Series. To create an Financial Chart with no predefined settings, see anychart#cartesian

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:

fromJsonFile

Creates a chart from JSON configuration.

Params:

Name Type Description
url string Link to JSON file
onSuccessOrContainer string | function The function that is launched after chart is successfully loaded
onError function The function that is launched if chart loading fails
method string Send method
content ArrayBuffer | ArrayBufferView | Blob | Document | FormData | string Data
headers Object Headers to add to the request
timeoutInterval number Number of milliseconds after which an incomplete request will be aborted
withCredentials boolean Whether to send credentials with the request
context * Context for handler function

Try it:

fromXml

Creates an element by XML config.

Params:

Name Type Description
xmlConfig string | Node Config.

Returns:

* - Element created by config.

Try it:

fromXmlFile

Creates a chart using XML configuration.

Params:

Name Type Description
url string Link to XML file
onSuccessOrContainer string | function The function that is launched after chart is successfully loaded
onError function The function that is launched if chart loading fails
method string Send method
content ArrayBuffer | ArrayBufferView | Blob | Document | FormData | string Data
headers Object Headers to add to the request
timeoutInterval number Number of milliseconds after which an incomplete request will be aborted
withCredentials boolean Whether to send credentials with the request
context * Context for handler function

Try it:

funnel

Creates and returns a Funnel Chart. Contains the predefined settings for the tooltip.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Try it:

ganttProject

Creates and returns a Gantt Project Chart.

Returns:

anychart.charts.Gantt - Gantt Project Chart

Try it:

ganttResource

Creates and returns a Gantt Resource Chart.

Returns:

anychart.charts.Gantt - Gantt Resource Chart

Try it:

ganttToolbar

Constructor function for gantt toolbar.

heatMap

Creates and returns a Heat Map.
Note: Contains predefined settings for axes and grids.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.HeatMap - Heat map chart.

Try it:

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

Creates and returns a Line Chart. Each passed parameter is considered as a set of data which is to become a base for the Line Series. To create an Line Chart with no predefined settings, see anychart#cartesian

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:

map

Creates and returns a Map.

Returns:

anychart.charts.Map - Map.

Try it:

marker

Creates and returns a Marker Chart. Each passed parameter is considered as a set of data which is to become a base for the Marker Series. To create an Marker Chart with no predefined settings, see anychart#scatter

Params:

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

Returns:

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

Try it:

markerMap

Creates and returns a Marker Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Marker Map.

Returns:

anychart.charts.Map - New map instance with a set of predefined settings suitable 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.

Try it:

pert

Creates and returns a Pert Chart.

Returns:

anychart.charts.Pert - Pert chart.

Try it:

pie

Creates and returns a Pie Chart.

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:

pie3d

Creates and returns a 3D Pie Chart.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.Pie - Chart with defaults for 3D Pie.

Try it:

polar

Creates and returns a Polar Chart.

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:

pyramid

Creates and returns a Pyramid Chart. Contains the predefined settings for the tooltip.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the chart.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Try it:

radar

Creates and returns a Radar chart.

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

Creates and returns a Scatter Chart. 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:

seatMap

Creates and returns a Seat map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Seat Map.

Returns:

anychart.charts.Map - New map instance with a set of predefined settings suitable for seatMap series.

Try it:

sparkline

Creates and returns a Sparkline Chart.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Value to set.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

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

Try it:

stock

Creates and returns a Stock Chart.

Returns:

anychart.charts.Stock - New stock chart instance.

Try it:

theme

Sets the theme for or gets the current theme. Learn more about themes.

Params:

Name Type Default Description
value string | Object | Array.<(string|Object)> | null
"defaultTheme"
Object with theme settings or name of the theme or array of objects/names of the themes.

Returns:

string Object Array.<(string|Object)> - Object with theme settings.

treeMap

Creates and returns a Tree Map.

Params:

Name Type Description
data anychart.data.Tree | Array.<Object> Data tree or raw data.
fillMethod anychart.enums.TreeFillingMethod Fill method.

Returns:

anychart.charts.TreeMap - Tree map chart with defaults.

Try it: