HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function() {
2
3
// chart type
4
var chart = anychart.cartesian();
5
6
// all data
7
var data = anychart.data.set([
8
{x: "2000", value: 1100, size: 3},
9
{x: "2001", value: 880, size: 4},
10
{x: "2002", value: 1100, size: 4},
11
{x: "2003", value: 1300, size: 5, fill: "gold", stroke: "#663399", type: "star5"},
12
{x: "2004", value: 921, size: 4.5},
13
{x: "2005", value: 1000, size: 3},
14
{x: "2006", value: 1400, size: 4}
15
]);
16
17
// set data for each series
18
series = chart.bubble(data);
19
20
// chart title
21
chart.title("Multi-Series Bubble Chart with an only bubble configured");
22
23
chart.legend(true);
24
25
// Sets settings for interactivity.
26
chart.interactivity({hoverMode: "byX"});
27
28
// set axes titles
29
chart.xAxis().title("Years");
30
chart.yAxis().title("Sales");
31
32
// draw
33
chart.container("container");
34
chart.draw();
35
});