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
// setting data
4
var data = anychart.data.set([
5
["January", 200],
6
["February", 289],
7
["March", 297],
8
["April", 250],
9
["May", 220],
10
["June", 215],
11
["July", 279],
12
["August", 357],
13
["September", 333],
14
["October", 218],
15
["November", 289],
16
["December", 266]
17
]);
18
19
var chart = anychart.column();
20
21
chart.title("Rotated Marker");
22
23
// series data
24
chart.column(data);
25
26
// create range marker
27
var marker = chart.rangeMarker();
28
// set start point of the marker
29
marker.from("June");
30
// set end point of the marker
31
marker.to("August");
32
// rotate marker
33
marker.layout("vertical");
34
// bound marker to chart's x scale
35
marker.scale(chart.xScale());
36
// set marker inner color
37
marker.fill("#d7fcda");
38
39
chart.container("container");
40
chart.draw();
41
});