Top
You are looking at an outdated 7.8.0 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.
bar()Creates and returns a Bar 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.
choropleth()Creates and returns a Choropleth Map.
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()Creates and returns a Gantt Project Chart.
ganttResource()Creates and returns a Gantt Resource Chart.
ganttToolbar()Constructor function for gantt toolbar.
heatMap()Creates and returns a Heat Map.
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.
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.
stock()Creates and returns a Stock 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

Try it:

Current version of the framework.

Type: string

Try it:

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

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

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

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Bubble chart data.

Returns:

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

Try it:

bubbleMap

Creates and returns a Bubble Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Bubble Map.

Returns:

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

Try it:

bullet

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

choropleth

Creates and returns a Choropleth Map.

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Data for creating a Choropleth Map.

Returns:

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

Try it:

circularGauge

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

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

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

Creates and returns a Funnel Chart. Contains the predefined settings for the 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

Creates and returns a Gantt Project Chart.

Returns:

anychart.charts.Gantt - Gantt Project Chart

Try it:

ganttResource

Creates and returns a Gantt Resource Chart.

Returns:

anychart.charts.Gantt - Gantt Resource Chart

Try it:

ganttToolbar

Constructor function for gantt toolbar.

heatMap

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

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.

Returns:

anychart.charts.HeatMap - Heat map chart.

Try it:

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

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:

map

Creates and returns a Map.

Returns:

anychart.charts.Map - Map.

Try it:

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

Params:

Name Type Description
var_args anychart.data.View | anychart.data.Set | Array Marker chart data.

Returns:

anychart.charts.Scatter - 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 a 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:

pie3d

Creates and returns a 3D Pie Chart.

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.

Returns:

anychart.charts.Pie - Chart with defaults for 3D Pie.

Try it:

polar

Creates and returns a Polar Chart.

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:

pyramid

Creates and returns a Pyramid Chart. Contains the predefined settings for the 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:

radar

Creates and returns a Radar chart.

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

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

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:

    Name Type Description
    address string Export server script URL.

    Try it:

    sparkline

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

    stock

    Creates and returns a Stock Chart.

    Returns:

    anychart.charts.Stock - New stock chart instance.

    Try it:

    theme

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

    Params:

    Name Type Default Description
    value string | Object
    "defaultTheme"
    Object with theme settings or name of the theme.

    toolbar

    Constructor function for default toolbar.

    Returns:

    anychart.ui.Toolbar -