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
// set the stage
3
stage = anychart.graphics.create("container");
4
5
// create a chart
6
var chart = anychart.line();
7
8
dataSet1 = ([1.1, 1.6, 1.4, 1.9]);
9
dataSet2 = ([1, 2, 1.9, 1.3]);
10
11
series1 = chart.line(dataSet1);
12
series2 = chart.line(dataSet2);
13
14
// add a title standalone object on the chart
15
title = anychart.standalones.title();
16
title.text("This is the title");
17
18
// chart padding
19
chart.padding().top(50);
20
21
// create a table and fill it in
22
table = anychart.standalones.table();
23
table.rowsCount(3);
24
table.colsCount(5);
25
table.zIndex(100000000);
26
table.bounds("80%", "35%", 200, 100);
27
28
// put the table on a stage and draw it
29
table.container(stage);
30
table.draw();
31
32
// put the chart on a stage and draw it
33
chart.container(stage);
34
chart.draw();
35
36
// put the title object on a stage
37
title.container(stage);
38
title.draw();
39
});