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.line();
3
4
chart.data([
5
['Nail polish', 12814, 3054, 4376],
6
['Eyebrow pencil', 13012, 5067, 3987],
7
['Rouge', 11624, 4004, 3574],
8
['Lipstick', 8814, 9054, 4376],
9
['Eyeshadows', 12998, 12043, 4572]
10
]);
11
12
// Enables legend.
13
chart.legend(true);
14
15
chart.title('Enable chart legend');
16
chart.container('container');
17
chart.draw();
18
});