AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 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.
barmekko()Creates and returns a Barmekko 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 chart toolbar.
heatMap()Creates and returns a Heat Map.
hilo()Creates and returns a HiLo Chart
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.
mekko()Creates and returns a Mekko Chart.
mosaic()Creates and returns a Mosaic Chart.
onDocumentLoad()Adds callback for the document load event.
onDocumentReady()Adds callback for the document ready event.
pareto()Creates and returns a Pareto Chart.
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.
quadrant()Creates and returns a Quadrant Chart.
radar()Creates and returns a Radar chart.
resource()Creates and returns a Resource 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.
tagCloud()Creates and returns a Tag Cloud.
theme()Sets the theme for or gets the current theme.
treeMap()Creates and returns a Tree Map.
venn()Creates and returns a Venn Chart.
vertical()Creates and returns a Vertical Chart.
verticalArea()Creates and returns a Vertical Area Chart.
verticalLine()Creates and returns a Vertical Line chart.
waterfall()Creates and returns a Waterfall chart.

Classes Overview

anychart.SignalEventSpecial event for changes in dirty states.

Constants Description

Defines if it is developer edition.

Type: boolean

Current version of the framework.

Type: string

Functions Description

appendTheme

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

Params:

NameTypeDescription
valuestring | ObjectObject with theme settings or name of the theme.

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayArea chart data.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayArea chart data.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayBar chart data.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayBar chart data.

Returns:

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

barmekko

Creates and returns a Barmekko Chart. A linear scale is used for Y-axis by default. Also, uses stack mode set to 'value'.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMekko chart data.

Returns:

anychart.charts.Mekko - Chart with defaults for mekko series.

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayBox chart data.

Returns:

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

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 a Bubble Chart with no predefined settings, see anychart#scatter

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayBubble chart data.

Returns:

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

bubbleMap

Creates and returns a Bubble Map.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayData for creating a Bubble Map.

Returns:

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

bullet

Creates and returns a Bullet Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringBullet Chart data.

Returns:

anychart.charts.Bullet - Bullet chart.

cartesian

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

Returns:

anychart.charts.Cartesian - Empty chart.

cartesian3d

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

Params:

NameTypeDescription
barChartModebooleanIf 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.

choropleth

Creates and returns a Choropleth Map.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayData for creating a Choropleth Map.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayColumn chart data.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayColumn chart data.

Returns:

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

connector

Creates and returns a Connector Map.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayData for creating a Connector Map.

Returns:

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

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayFinance chart data.

Returns:

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

fromJson

Creates an element by JSON config.

Params:

NameTypeDescription
jsonConfigObject | stringConfig.

Returns:

* - Element created by config.

fromJsonFile

Creates a chart from JSON configuration.

Params:

NameTypeDescription
urlstringLink to JSON file
onSuccessOrContainerstring | functionThe function that is launched after chart is successfully loaded
onErrorfunctionThe function that is launched if chart loading fails
methodstringSend method
contentArrayBuffer | ArrayBufferView | Blob | Document | FormData | stringData
headersObjectHeaders to add to the request
timeoutIntervalnumberNumber of milliseconds after which an incomplete request will be aborted
withCredentialsbooleanWhether to send credentials with the request
context*Context for handler function

fromXml

Creates an element by XML config.

Params:

NameTypeDescription
xmlConfigstring | NodeConfig.

Returns:

* - Element created by config.

fromXmlFile

Creates a chart using XML configuration.

Params:

NameTypeDescription
urlstringLink to XML file
onSuccessOrContainerstring | functionThe function that is launched after chart is successfully loaded
onErrorfunctionThe function that is launched if chart loading fails
methodstringSend method
contentArrayBuffer | ArrayBufferView | Blob | Document | FormData | stringData
headersObjectHeaders to add to the request
timeoutIntervalnumberNumber of milliseconds after which an incomplete request will be aborted
withCredentialsbooleanWhether to send credentials with the request
context*Context for handler function

funnel

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

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

ganttProject

Creates and returns a Gantt Project Chart.

Returns:

anychart.charts.Gantt - Gantt Project Chart

ganttResource

Creates and returns a Gantt Resource Chart.

Returns:

anychart.charts.Gantt - Gantt Resource Chart

ganttToolbar

Constructor function for Gantt chart toolbar.

heatMap

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

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.HeatMap - Heat map chart.

hilo

Creates and returns a HiLo Chart

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayHiLo chart data.

Returns:

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

licenseKey

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

Params:

NameTypeDescription
valuestringYour licence key.

Returns:

string - Current licence key.

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayLine chart data.

Returns:

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

map

Creates and returns a Map.

Returns:

anychart.charts.Map - Map.

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 a Marker Chart with no predefined settings, see anychart#scatter

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMarker chart data.

Returns:

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

markerMap

Creates and returns a Marker Map.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayData for creating a Marker Map.

Returns:

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

mekko

Creates and returns a Mekko Chart. A linear scale is used for Y-axis by default. Points padding is set to 0.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMekko chart data.

Returns:

anychart.charts.Mekko - Chart with defaults for mekko series.

mosaic

Creates and returns a Mosaic Chart. A ordinal scale is used for Y-axis by default.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMekko chart data.

Returns:

anychart.charts.Mekko - Chart with defaults for mekko series.

onDocumentLoad

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

Params:

NameTypeDescription
funcfunctionFunction which will be called on document load event.
scope*Function call context.

onDocumentReady

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

Params:

NameTypeDescription
funcfunctionFunction which is called on the document load event.
scope*Function call context.

pareto

Creates and returns a Pareto Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | ArrayPareto chart data.

Returns:

anychart.charts.Pareto - Chart with defaults for line and column series.

pert

Creates and returns a Pert Chart.

Returns:

anychart.charts.Pert - Pert chart.

pie

Creates and returns a Pie Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.

Returns:

anychart.charts.Pie - Default pie chart.

pie3d

Creates and returns a 3D Pie Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf 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.

polar

Creates and returns a Polar Chart.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMarker chart data.

Returns:

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

pyramid

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

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

quadrant

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

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMarker chart data.

Returns:

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

radar

Creates and returns a Radar chart.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayLine chart data.

Returns:

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

resource

Creates and returns a Resource Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringResource chart data.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.Resource - New resource instance.

scatter

Creates and returns a Scatter Chart. By default creates marker series if arguments is set.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayMarker chart data.

Returns:

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

seatMap

Creates and returns a Seat map.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayData for creating a Seat Map.

Returns:

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

sparkline

Creates and returns a Sparkline Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringValue to set.
csvSettingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf 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.

stock

Creates and returns a Stock Chart.

Params:

NameTypeDescription
allowPointSettingsbooleanAllows to set point settings from data.

Returns:

anychart.charts.Stock - New stock chart instance.

tagCloud

Creates and returns a Tag Cloud.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
settingsanychart.enums.TextParsingMode | anychart.data.TextParsingSettingsIf CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.TagCloud - Tag Cloud with defaults.

theme

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

Params:

NameTypeDefaultDescription
valuestring | 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:

NameTypeDescription
dataanychart.data.Tree | anychart.data.TreeView | Array.<Object>Data tree or raw data.
fillMethodanychart.enums.TreeFillingMethodFill method.

Returns:

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

venn

Creates and returns a Venn Chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringData for the chart.
csvSettingsObject.<string, (string|boolean)>If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.charts.Venn - Venn chart.

vertical

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

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayVertical chart data.

Returns:

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

verticalArea

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

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayVertical Area chart data.

Returns:

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

verticalLine

Creates and returns a Vertical Line chart. Each passed parameter is considered as a set of data which is to become a data set for a Line Series.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayVertical Line chart data.

Returns:

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

waterfall

Creates and returns a Waterfall chart.

Params:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayWaterfall chart data.

Returns:

anychart.charts.Waterfall - Chart with defaults for waterfall series.