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
chart1.title("Reviews for matryoshka567");
7
8
// create data for both charts
9
chart1.data([500,-100,340,200,-90,80,-70]);
10
11
// set charts dimensions and postition
12
chart1.bounds(0, 0, 300, 40);
13
chart1.seriesType("win-loss");
14
15
// set container id for the charts
16
chart1.container(stage);
17
// initiate chart drawing
18
chart1.draw();
19
});