Top
You are looking at an outdated 7.4.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

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()Creates and returns an Bubble Chart with a set of predefined settings.
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()Default 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()Creates and returns an Marker Chart with a set of predefined settings.
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.
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

Try it:

Current version of the framework.

Type: string

Try it:

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:

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

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:

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:

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:

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 an Bubble 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 Bubble Series. To create an Bubble Chart with no predefined settings, see anychart#cartesian

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:

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:

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:

circularGauge

Default circular gauge.

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.gauges.Circular - Circular gauge with defaults.

Try it:

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:

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

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:

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:

funnel

Default funnel 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.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Try it:

ganttProject

Constructor function for gantt project chart.

Returns:

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

Try it:

ganttResource

Constructor function for gantt resource chart.

Returns:

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

Try it:

ganttToolbar

Constructor function for gantt toolbar.

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

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

Creates and returns an Marker 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 Marker Series. To create an Marker Chart with no predefined settings, see anychart#cartesian

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.

Try it:

pie

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

polar

Default polar chart. 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. 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:

sparkline

Default 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:

toolbar

Constructor function for default toolbar.

Returns:

anychart.ui.Toolbar -