AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.5.1 version of this document. Switch to the 8.4.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()Creates and returns an Area Chart with a set of predefined settings.
bar()Creates and returns an Bar Chart with a set of predefined settings.
box()Creates and returns an Box Chart with a set of predefined settings.
bubble()Default bubble chart.
bullet()Creates a bullet chart.
cartesian()Creates and returns an object, that is a base for all of the Cartesian-based charts.
circularGauge()Default circular gauge.
column()Creates and returns an Column Chart with a set of predefined settings.
financial()Creates and returns an Financial Chart with a set of predefined settings.
fromJson()Creates an element by JSON config.
fromXml()Creates an element by XML config.
funnel()Creates and returns Funnel Chart.
ganttProject()Constructor function for gantt project chart.
ganttResource()Constructor function for gantt resource chart.
ganttToolbar()Constructor function for gantt toolbar.
licenseKey()Setter for AnyChart license key.
line()Creates and returns an Line Chart with a set of predefined settings.
marker()Default marker chart.
onDocumentLoad()Add callback for the document load event.
onDocumentReady()Add callback for document ready event.
pie()Creates and returns Pie Chart.
polar()Default polar chart. Contains predefined settings for axes and grids.
pyramid()Creates and returns Pyramid Chart.
radar()Default radar chart. Contains predefined settings for axes and grids.
scatter()Returns a scatter chart instance with initial settings (axes, grids, title).
sparkline()Default sparkline chart.
toolbar()Constructor function for default toolbar.

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

area

Creates and returns an Area Chart with a set of predefined settings. 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.

bar

Creates and returns an Bar Chart with a set of predefined settings. 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.

box

Creates and returns an Box Chart with a set of predefined settings. 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

Default bubble chart. Creates and returns an Bubble Chart with a set of predefined settings for axes and grids. 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:

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

Returns:

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

bullet

Creates 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 an object, that is a base for all of the Cartesian-based charts. Has no predefined settings such as axes, grids, legends 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.Cartesian - Empty chart.

circularGauge

Default circular gauge.

Params:

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

Returns:

anychart.gauges.Circular - Circular gauge with defaults.

column

Creates and returns an Column Chart with a set of predefined settings. 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.

financial

Creates and returns an Financial Chart with a set of predefined settings. 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.

fromXml

Creates an element by XML config.

Params:

NameTypeDescription
xmlConfigstring | NodeConfig.

Returns:

* - Element created by config.

funnel

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

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.

ganttProject

Constructor function for gantt project chart.

Returns:

anychart.charts.Gantt - Self instance for method chaining.

ganttResource

Constructor function for gantt resource chart.

Returns:

anychart.charts.Gantt - Self instance for method chaining.

ganttToolbar

Constructor function for gantt toolbar.

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 an Line Chart with a set of predefined settings. 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.

marker

Default marker chart. Creates and returns an Marker Chart with a set of predefined settings for axes and grids. 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:

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

Returns:

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

onDocumentLoad

Add 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

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:

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

pie

Creates and returns Pie Chart.

Params:

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

Returns:

anychart.charts.Pie - Default pie chart.

polar

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

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 Pyramid Chart. Contains the predefined settings for the tooltip.

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.

radar

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

Params:

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

Returns:

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

scatter

Returns a scatter chart instance with initial settings (axes, grids, title). 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.

sparkline

Default sparkline chart.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | Array | stringValue to set.
csvSettingsObject.<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.

toolbar

Constructor function for default toolbar.