namespace anychart Improve this Doc
Core space for all anychart components.
Constants Overview
DEVELOP | Defines if it is developer edition. |
VERSION | The 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. |
calendar() | Creates and returns a Calendar Chart. |
candlestick() | Creates and returns a Candlestick Chart. |
cartesian() | Creates and returns a Cartesian chart. |
cartesian3d() | Creates and returns a Cartesian 3D chart. |
choropleth() | Creates and returns a Choropleth Map. |
circlePacking() | Creates and returns a Circle Packing chart. |
column() | Creates and returns a Column Chart. |
column3d() | Creates and returns an Column 3D Chart. |
connector() | Creates and returns a Connector Map. |
editor() | Creates Chart Editor. |
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. |
getChartById() | Returns tracking chart by it's id. |
graph() | Creates and returns an instance of Graph Chart. |
heatMap() | Creates and returns a Heat Map. |
hilo() | Creates and returns a HiLo Chart |
jumpLine() | Creates and returns a JumpLine Chart. |
licenseKey() | Setter for AnyChart license key. |
line() | Creates and returns a Line Chart. |
line3d() | Creates and returns a Line 3D 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. |
ohlc() | Creates and returns an OHLC 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. |
sankey() | Creates and returns a Sankey. |
scatter() | Creates and returns a Scatter Chart. |
seatMap() | Creates and returns a Seat map. |
sparkline() | Creates and returns a Sparkline Chart. |
stepLine() | Creates and returns a StepLine Chart. |
stick() | Creates and returns a Stick Chart. |
stock() | Creates and returns a Stock Chart. |
sunburst() | Creates and returns a Sunburst Chart. |
surface() | Creates and returns a Surface chart. |
tagCloud() | Creates and returns a Tag Cloud. |
theme() | Sets the theme for or gets the current theme. |
timeline() | Creates and returns a Timeline Chart. |
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. |
wordtree() | Creates and returns a Wordtree 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 | An object with theme settings or the 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 3D Area.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 3D Bar.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:
calendar
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Calendar Chart data. |
Returns:
anychart.charts.Calendar - Calendar chart.candlestick
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Candlestick chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for Candlestick series.Try it:
cartesian
- anychart#area
- anychart#bar
- anychart#column
- anychart#stick
- anychart#jumpLine
- anychart#stepLine
- anychart#ohlc
- anychart#candlestick
- anychart#line
- anychart#box
Returns:
anychart.charts.Cartesian - Empty chart.Try it:
cartesian3d
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:
circlePacking
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.Tree | anychart.data.TreeView | Array.<Object> | Data tree or raw data. |
fillMethod | anychart.enums.TreeFillingMethod | string | Fill method. |
Returns:
anychart.charts.CirclePacking - Circle Packing chart with defaults.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:
editor
Chart Editor allows to create and work with Anychart JavaScript Charts.
To work with the Chart Editor you need to reference the extension file from AnyChart CDN (example for the versioned file: https://cdn.anychart.com/releases/8.13.0/js/anychart-editor.min.js)
Returns:
anychart.editor.Editor - Chart editor.// Create the chart editor. var editor = anychart.editor(); editor.render(document.getElementById('container'));See sample at https://www.anychart.com/features/chart_editor/demo.html
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 is 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 is 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 - Funnel Chart.Try it:
ganttProject
Returns:
anychart.charts.Gantt - Gantt Project ChartTry it:
ganttResource
Returns:
anychart.charts.Gantt - Gantt Resource ChartTry it:
getChartById
Params:
Name | Type | Description |
---|---|---|
id | string | Chart id to set. |
Returns:
anychart.core.Chart - Returns chart.Try it:
graph
Params:
Name | Type | Description |
---|---|---|
data | Object | Data is object with two required fields 'edges' and 'nodes'.
Requires for node data object:
|
Returns:
anychart.charts.Graph - Graph chart.Try it:
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 | string | 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:
jumpLine
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | JumpLine chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for jumpLine series.Try it:
licenseKey
To purchase a license proceed to Buy AnyChart page.
Params:
Name | Type | Description |
---|---|---|
key | string | Your licence key. |
Returns:
string - Current license 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:
line3d
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Line chart data. |
Returns:
anychart.charts.Cartesian3d - Chart with defaults for 3D Line.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:
ohlc
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | OHLC chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for OHLC 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 | A function which is 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 | A function which is called on 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 - 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 | string | 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 - Pyramid Chart.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 - Resource Chart.Try it:
sankey
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 | string | 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:
stepLine
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | StepLine chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for stepLine series.Try it:
stick
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Stick chart data. |
Returns:
anychart.charts.Cartesian - Chart with defaults for stick series.Try it:
stock
Params:
Name | Type | Default | Description |
---|---|---|---|
allowPointSettings | boolean | false | Allows to set point settings from data. The following values are available in the context of the point: { index - point index, (number) sourceColor - source color of the point (string) iterator - series point iterator, instance of anychart.data.TableIterator series - link to the series, instance of anychart.core.stock.series plot - link to the plot, instance of anychart.core.stock.Plot chart - link to the chart, instance of anychart.charts.Stock } |
Returns:
anychart.charts.Stock - New stock chart instance.Try it:
sunburst
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.Tree | anychart.data.TreeView | Array.<Object> | Data tree or raw data. |
fillMethod | anychart.enums.TreeFillingMethod | string | Fill method. |
Returns:
anychart.charts.Sunburst - Sunburst chart.Try it:
surface
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for surface chart. |
csvSettings | anychart.enums.TextParsingMode | string | anychart.data.TextParsingSettings | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.charts.Surface - Surface chart.Try it:
tagCloud
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | string | Data for the chart. |
settings | anychart.enums.TextParsingMode | string | 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 |
---|---|---|---|
settings | 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.timeline
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | Data for the chart. |
Returns:
anychart.charts.Timeline - Timeline chart.Try it:
treeMap
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.Tree | anychart.data.TreeView | Array.<Object> | Data tree or raw data. |
fillMethod | anychart.enums.TreeFillingMethod | string | 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:
wordtree
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.Tree | string | Array.<Object> | Array.<Array.<string>> | Array.<string> | null | Chart data to set. |
fillMethod | anychart.enums.TreeFillingMethod | string | Fill method. |
Returns:
anychart.charts.Wordtree - Wordtree chart.Try it: