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
var series = chart.line([
5
{x: 'Meat', value: 10},
6
{x: 'Fruit', value: 12},
7
{x: 'Nuts', value: 18},
8
{x: 'Milk', value: 11},
9
{x: 'Fish', value: 9}
10
]);
11
12
series.normal().stroke('3 #008b00');
13
series.normal().negativeStroke('3 #ff4040');
14
15
// Set baseline value
16
chart.baseline(14);
17
18
chart.title('Set baseline value');
19
chart.container('container');
20
chart.draw();
21
});