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 stage = anychart.graphics.create("container");
3
// create charts
4
chart1 = anychart.sparkline();
5
6
// set container id for the charts
7
chart1.container(stage);
8
chart1.title(true);
9
chart1.title().text("Reviews for matryoshka567");
10
11
// create data for both charts
12
chart1.data([500,-100,340,200,-90,80,-70]);
13
14
chart1.labels().enabled(true);
15
16
// set charts dimensions and postition
17
chart1.bounds(0, 0, 300, 80);
18
chart1.type("column");
19
20
// initiate chart drawing
21
chart1.draw();
22
});