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
3
// set the data
4
table = anychart.data.table();
5
table.addData([
6
['2010-01-01T12:00:00', 5.8, 7.9],
7
['2010-02-01T12:00:00', 4.6, 6.1],
8
['2010-03-01T12:00:00', 5.9, 8.1],
9
['2010-04-01T12:00:00', 7.8, 10.7],
10
['2010-05-01T12:00:00', 10.5, 13.7],
11
['2010-06-01T12:00:00', 13.8, 17],
12
['2010-07-01T12:00:00', 16.5, 18.5],
13
['2010-08-31T12:00:00', 17.8, 19],
14
['2010-09-01T12:00:00', 15.4, 17.8],
15
['2010-10-01T12:00:00', 12.7, 15.3],
16
['2010-11-01T12:00:00', 9.8, 13],
17
['2010-12-01T12:00:00', 9, 10.1],
18
19
['2010-01-01T12:00:00', 5.7, 8],
20
['2011-02-01T12:00:00', 6, 8.4],
21
['2011-03-01T12:00:00', 6, 9.5],
22
['2011-04-01T12:00:00', 7.7, 10],
23
['2011-05-01T12:00:00', 8.9, 11.1],
24
['2011-06-01T12:00:00', 10.2, 16.3],
25
['2011-07-01T12:00:00', 14.3, 19],
26
['2011-08-01T12:00:00', 16, 20.1],
27
['2011-09-01T12:00:00', 15.8, 18.9],
28
['2011-10-01T12:00:00', 11.4, 13.2],
29
['2011-11-01T12:00:00', 8.3, 10],
30
['2011-12-01T12:00:00', 6.5, 8.7],
31
32
['2012-01-01T12:00:00', 7.2, 8.6],
33
['2012-02-01T12:00:00', 5.3, 7.4],
34
['2012-03-01T12:00:00', 6.1, 9.4],
35
['2012-04-01T12:00:00', 8.7, 11.2],
36
['2012-05-21T12:00:00', 10.4, 14.3],
37
['2012-06-22T12:00:00', 13.5, 17.1],
38
['2012-07-23T12:00:00', 15.8, 19.7],
39
['2012-08-24T12:00:00', 17.8, 21],
40
['2012-09-25T12:00:00', 15.1, 17.3],
41
['2012-10-26T12:00:00', 12.6, 15.9],
42
['2012-11-27T12:00:00', 10.2, 13.8],
43
['2012-12-28T12:00:00', 8.3, 9.6]
44
]);
45
46
// map the data
47
mapping = table.mapAs();
48
mapping.addField('low', 1);
49
mapping.addField('high', 2);
50
51
// chart type
52
var chart = anychart.stock();
53
54
// set the series
55
var series = chart.plot(0).rangeColumn(mapping);
56
series.name("Water temperature in London in 2010-2012");
57
58
chart.title('Water Temperature');
59
chart.container('container');
60
61
chart.draw();
62
});