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
var chart = anychart.sparkline();
3
4
// Set data.
5
chart.data([
6
[1, 1],
7
[2, 35],
8
[3, 5],
9
[4, 43],
10
[5, 15]
11
]);
12
13
chart.title({text: 'Set chart data as an array of arrays', orientation: 'top'});
14
chart.container('container');
15
chart.draw();
16
});