AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.2.0 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

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

Classes Overview

anychart.BaseClass implementins all the work with consistency states.
anychart.ChartBase class for all charts, contains the margins, the background and the title.
anychart.SignalEventSpecial event for changes in dirty states.
anychart.VisualBaseBase class for all elements.
anychart.VisualBaseWithBoundsAn extended base element that understands bounds settings and can handle percent values in it.

Constants Description

Defines if it is developer edition.

Type: boolean

Current version of the framework.

Type: string

Functions Description

areaChart

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

Params:

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

Returns:

anychart.cartesian.Chart - Chart with defaults for area series.

barChart

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

Params:

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

Returns:

anychart.cartesian.Chart - Chart with defaults for bar series.

bubbleChart

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

Params:

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

Returns:

anychart.cartesian.Chart - Chart with defaults for bubble series.

bulletChart

Default bullet chart.

Params:

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

Returns:

anychart.bullet.Chart - Bullet chart.

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:

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.cartesian.Chart - Empty chart.

columnChart

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

Params:

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

Returns:

anychart.cartesian.Chart - Chart with defaults for column series.

financialChart

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

Params:

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

Returns:

anychart.cartesian.Chart - 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.

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.

lineChart

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

Params:

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

Returns:

anychart.cartesian.Chart - Chart with defaults for line series.

markerChart

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

Params:

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

Returns:

anychart.cartesian.Chart - 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.

pieChart

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

Params:

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

Returns:

anychart.pie.Chart - Default pie chart.