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 data = getData();
3
4
var chart = anychart.heatMap(data);
5
chart.title('Set select marquee stroke. Use mouse to draw marquee');
6
chart.container('container');
7
chart.draw();
8
9
chart.startSelectRectangleMarquee(true);
10
11
// Set select marquee stroke.
12
chart.selectRectangleMarqueeStroke('#424242', 2, '5 2');
13
});
14
15
function getData() {
16
return [
17
{x: 'California', y: '2004', heat: 1704211},
18
{x: 'California', y: '2005', heat: 2782680},
19
{x: 'California', y: '2006', heat: 2992679},
20
{x: 'Illinois', y: '2004', heat: 727914},
21
{x: 'Illinois', y: '2005', heat: 1150659},
22
{x: 'Illinois', y: '2006', heat: 1134085},
23
{x: 'Massachusetts', y: '2004', heat: 238819},
24
{x: 'Massachusetts', y: '2005', heat: 157719},
25
{x: 'Massachusetts', y: '2006', heat: 887169},
26
{x: 'New York', y: '2004', heat: 1667969},
27
{x: 'New York', y: '2005', heat: 2763503},
28
{x: 'New York', y: '2006', heat: 3151022},
29
{x: 'Texas', y: '2004', heat: 219967},
30
{x: 'Texas', y: '2005', heat: 3732889},
31
{x: 'Texas', y: '2006', heat: 4185098}
32
]
33
}