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.column([
3
{x: 'January', value: 2},
4
{x: 'February', value: 5},
5
{x: 'March', value: 3},
6
{x: 'April', value: 9},
7
{x: 'May', value: 4}
8
]);
9
10
chart.title('Marquee event types. \nUse mouse to draw marquee');
11
chart.container('container');
12
chart.draw();
13
14
chart.startSelectRectangleMarquee(true);
15
16
// Set event type to initiate drawing the rectangle marquee
17
chart.listen('selectMarqueeStart', function (e) {
18
chart.title('Rectangle marquee drawing is started');
19
chart.selectRectangleMarqueeFill('#A5D6A7 0.4');
20
});
21
22
// Set event type to finish drawing the rectangle marquee
23
chart.listen('selectMarqueeFinish', function (e) {
24
chart.title('Rectangle marquee drawing is finished');
25
chart.getSeries(0).selected().fill('#EF9A9A')
26
});
27
});