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