HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 100%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function() {
2
// set the data
3
var data = {
4
header: ['Year', 'Interest Expense on the Debt, USD bln.'],
5
rows: [
6
[2007, 429],
7
[2008, 451],
8
[2009, 383],
9
[2010, 413],
10
[2011, 454],
11
[2012, 359],
12
[2013, 415],
13
[2014, 430],
14
[2015, 402],
15
[2016, 432]
16
]};
17
18
// create the chart
19
var chart = anychart.area();
20
21
// add the data
22
chart.data(data);
23
24
// set the chart title
25
chart.title('Interest Expense on the Debt Outstanding');
26
27
chart.container('container');
28
chart.draw();
29
});