namespace anychart Improve this Doc
Core space for all anychart components.
Constants Overview
DEVELOP | Defines if it is developer edition. |
VERSION | Current version of the framework. |
Functions Overview
appendTheme() | Append theme for anychart globally. |
area() | Creates and returns an Area Chart. |
area3d() | Creates and returns an Area 3D Chart. |
bar() | Creates and returns a Bar Chart. |
bar3d() | Creates and returns a Bar 3D Chart. |
barmekko() | Creates and returns a Barmekko 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. |
cartesian3d() | Creates and returns a Cartesian 3D chart. |
choropleth() | Creates and returns a Choropleth Map. |
column() | Creates and returns a Column Chart. |
column3d() | Creates and returns an Column 3D Chart. |
connector() | Creates and returns a Connector Map. |
financial() | Creates and returns a Financial Chart. |
fromJson() | Creates an element by JSON config. |
fromJsonFile() | Creates a chart from JSON configuration. |
fromXml() | Creates an element by XML config. |
fromXmlFile() | Creates a chart using XML configuration. |
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 chart toolbar. |
heatMap() | Creates and returns a Heat Map. |
hilo() | Creates and returns a HiLo Chart |
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. |
markerMap() | Creates and returns a Marker Map. |
mekko() | Creates and returns a Mekko Chart. |
mosaic() | Creates and returns a Mosaic Chart. |
onDocumentLoad() | Adds callback for the document load event. |
onDocumentReady() | Adds callback for the document ready event. |
pareto() | Creates and returns a Pareto Chart. |
pert() | Creates and returns a Pert Chart. |
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. |
quadrant() | Creates and returns a Quadrant Chart. |
radar() | Creates and returns a Radar chart. |
resource() | Creates and returns a Resource Chart. |
scatter() | Creates and returns a Scatter Chart. |
seatMap() | Creates and returns a Seat map. |
sparkline() | Creates and returns a Sparkline Chart. |
stock() | Creates and returns a Stock Chart. |
tagCloud() | Creates and returns a Tag Cloud. |
theme() | Sets the theme for or gets the current theme. |
treeMap() | Creates and returns a Tree Map. |
venn() | Creates and returns a Venn Chart. |
vertical() | Creates and returns a Vertical Chart. |
verticalArea() | Creates and returns a Vertical Area Chart. |
verticalLine() | Creates and returns a Vertical Line chart. |
waterfall() | Creates and returns a Waterfall chart. |
Classes Overview
anychart.SignalEvent | Special event for changes in dirty states. |
Constants Description
Functions Description
appendTheme
This method applies the theme or theme settings over the existing theme.
Params:
Name | Type | Description |
---|---|---|
value | string | Object | Object with theme settings or name of the theme. |
Try it:
area
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:
area3d
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Area chart data. |
Returns:
anychart.charts.Cartesian3d - Chart with defaults for area series.Try it:
bar
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:
bar3d
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Bar chart data. |
Returns:
anychart.charts.Cartesian3d - Chart with defaults for bar series.Try it:
barmekko
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Mekko chart data. |
Returns:
anychart.charts.Mekko - Chart with defaults for mekko series.Try it:
box
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
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
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
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
If you need the Bar Chart mode you have to swap axes using anychart.core.axes.Linear#orientation method.
Returns:
anychart.charts.Cartesian - Empty chart.Try it:
cartesian3d
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.Cartesian3d - Empty chart.Try it:
choropleth
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:
column
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:
column3d
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Column chart data. |
Returns:
anychart.charts.Cartesian3d - Chart with defaults for column series.Try it:
connector
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Data for creating a Connector Map. |
Returns:
anychart.charts.Map - New map instance with a set of predefined settings suitable for connector series.Try it:
financial
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
Params:
Name | Type | Description |
---|---|---|
jsonConfig | Object | string | Config. |
Returns:
* - Element created by config.Try it:
fromJsonFile
Params:
Name | Type | Description |
---|---|---|
url | string | Link to JSON file |
onSuccessOrContainer | string | function | The function that is launched after chart is successfully loaded |
onError | function | The function that is launched if chart loading fails |
method | string | Send method |
content | ArrayBuffer | ArrayBufferView | Blob | Document | FormData | string | Data |
headers | Object | Headers to add to the request |
timeoutInterval | number | Number of milliseconds after which an incomplete request will be aborted |
withCredentials | boolean | Whether to send credentials with the request |
context | * | Context for handler function |
Try it:
fromXml
Params:
Name | Type | Description |
---|---|---|
xmlConfig | string | Node | Config. |
Returns:
* - Element created by config.Try it:
fromXmlFile
Params:
Name | Type | Description |
---|---|---|
url | string | Link to XML file |
onSuccessOrContainer | string | function | The function that is launched after chart is successfully loaded |
onError | function | The function that is launched if chart loading fails |
method | string | Send method |
content | ArrayBuffer | ArrayBufferView | Blob | Document | FormData | string | Data |
headers | Object | Headers to add to the request |
timeoutInterval | number | Number of milliseconds after which an incomplete request will be aborted |
withCredentials | boolean | Whether to send credentials with the request |
context | * | Context for handler function |
Try it:
funnel
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for the chart. |
csvSettings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.charts.Funnel -Try it:
ganttProject
Returns:
anychart.charts.Gantt - Gantt Project ChartTry it:
ganttResource
Returns:
anychart.charts.Gantt - Gantt Resource ChartTry it:
ganttToolbar
Returns:
anychart.ui.GanttToolbar -heatMap
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 | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | 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:
hilo
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | HiLo chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for HiLo series.Try it:
licenseKey
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
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
marker
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:
markerMap
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Data for creating a Marker Map. |
Returns:
anychart.charts.Map - New map instance with a set of predefined settings suitable for marker series.Try it:
mekko
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Mekko chart data. |
Returns:
anychart.charts.Mekko - Chart with defaults for mekko series.Try it:
mosaic
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Mekko chart data. |
Returns:
anychart.charts.Mekko - Chart with defaults for mekko series.Try it:
onDocumentLoad
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
It is called when the DOM is ready, this can happen prior to loading images and other external content.
Params:
Name | Type | Description |
---|---|---|
func | function | Function which is called on the document load event. |
scope | * | Function call context. |
Try it:
pareto
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | Pareto chart data. |
Returns:
anychart.charts.Pareto - Chart with defaults for line and column series.Try it:
pert
pie
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
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for the chart. |
csvSettings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | 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
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
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for the chart. |
csvSettings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.charts.Pyramid -Try it:
quadrant
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:
radar
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:
resource
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Resource chart data. |
csvSettings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.charts.Resource - New resource instance.Try it:
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 scatter series.Try it:
seatMap
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Data for creating a Seat Map. |
Returns:
anychart.charts.Map - New map instance with a set of predefined settings suitable for seatMap series.Try it:
sparkline
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Value to set. |
csvSettings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | 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
Params:
Name | Type | Description |
---|---|---|
allowPointSettings | boolean | Allows to set point settings from data. |
Returns:
anychart.charts.Stock - New stock chart instance.Try it:
tagCloud
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for the chart. |
settings | anychart.enums.TextParsingMode | anychart.data.TextParsingSettings | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.charts.TagCloud - Tag Cloud with defaults.Try it:
theme
For example, to use theme name "pastel" you have to connect special theme file with the name pastel.js.
This file, as well as other files, can be found at https://cdn.anychart.com/#themes.
After referencing the file you can use theme() method with "pastel" parameter to apply pastel theme: anychart.theme("pastel");
To disable installed themes - pass null.
Sets theme settings depending on parameter type:
- null - disable passed theme settings.
- object - sets theme settings.
- string - sets theme name.
- array - sets theme name and theme settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | Object | Array.<(string|Object)> | null | "defaultTheme" | Object with theme settings or name of the theme or array of objects/names of the themes. |
Returns:
string | Object | Array.<(string|Object)> - Object with theme settings.treeMap
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.Tree | anychart.data.TreeView | Array.<Object> | Data tree or raw data. |
fillMethod | anychart.enums.TreeFillingMethod | Fill method. |
Returns:
anychart.charts.TreeMap - Tree map chart with defaults.Try it:
venn
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.Venn - Venn chart.Try it:
vertical
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Vertical chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for bar series.Try it:
verticalArea
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Vertical Area chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for vertical area series.Try it:
verticalLine
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Vertical Line chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for vertical line series.Try it:
waterfall
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Waterfall chart data. |
Returns:
anychart.charts.Waterfall - Chart with defaults for waterfall series.Try it: