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

area()Creates and returns an Area Chart.
bar()Creates and returns a Bar Chart.
box()Creates and returns a Box Chart.
bubble()Creates and returns Scatter chart with predefined settings of the Bubble Chart.
bullet()Creates and returns a Bullet Chart.
cartesian()Creates and returns an object, that is a base for all of the Cartesian-based charts.
circularGauge()Creates and returns a Circular Gauge.
column()Creates and returns a Column Chart.
financial()Creates and returns a Financial Chart.
fromJson()Creates an element by JSON config.
fromXml()Creates an element by XML config.
funnel()Creates and returns a 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 a Line Chart.
map()Creates and returns map.
marker()Creates and returns Scatter chart with predefined settings of the Marker Chart.
onDocumentLoad()Add callback for the document load event.
onDocumentReady()Add callback for document ready event.
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.
server()Sets an address export server script, which is used to export to an image or PDF.
sparkline()Creates and returns a Sparkline Chart.
theme()Sets the theme for anychart globally or gets current theme.
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. Each passed parameter is considered as a set of data which is to become a base for the Area Series. Area Chart creates with a set of predefined settings for axes. 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 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.

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 Scatter chart with predefined settings of the 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 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 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

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

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.

fromXml

Creates an element by XML config.

Params:

NameTypeDescription
xmlConfigstring | NodeConfig.

Returns:

* - Element created by config.

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.
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.
Constructor function for gantt project chart.

Returns:

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

ganttResource

Constructor function for Gantt Resource Chart.
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 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 map.

Returns:

anychart.charts.Map - Map.

marker

Creates and returns Scatter chart with predefined settings of the 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 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.
csvSettingsObject.<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.

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

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.

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.

server

Sets an address export server script, which is used to export to an image or PDF.
See:
  • anychart.graphics.vector.Stage#saveAsPdf
  • anychart.graphics.vector.Stage#saveAsPng
  • anychart.graphics.vector.Stage#saveAsJpg
  • anychart.graphics.vector.Stage#saveAsSvg
  • Params:

    NameTypeDescription
    addressstringExport server script URL.

    sparkline

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

    theme

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

    Params:

    NameTypeDefaultDescription
    valuestring | Object
    "defaultTheme"
    Object with theme settings or name of the theme.

    toolbar

    Constructor function for default toolbar.