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.scatter();
3
chart.line([
4
{x: 1, value: 0},
5
{x: 2, value: 20},
6
{x: 3, value: 10},
7
{x: 4, value: 30},
8
{x: 5, value: 20},
9
{x: 6, value: 40},
10
{x: 7, value: 30},
11
{x: 8, value: 50},
12
{x: 9, value: 40},
13
{x: 1, value: 0}
14
]);
15
16
// Get normal state.
17
var state = chart.normal();
18
19
state.labels({enabled: true, fontColor: '#ff0000'});
20
21
chart.title('Get and modify normal state');
22
chart.container('container');
23
chart.draw();
24
});