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 = [
3
{id: 'AU.CT', value: 15},
4
{id: 'AU.VI', value: 23},
5
{id: 'AU.WA', value: 86},
6
{id: 'AU.QL', value: 16},
7
{id: 'AU.NS', value: 32},
8
{id: 'AU.NT', value: 64},
9
{id: 'AU.TS', value: 28},
10
{id: 'AU.SA', value: 45}
11
];
12
13
var map = anychart.map();
14
map.geoData(anychart.maps.australia);
15
map.choropleth(data);
16
17
var callout = map.callout();
18
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
19
20
// Set normal state.
21
callout.normal({labels: {enabled: true, fontColor: '#F44336'}});
22
23
map.title('Set normal state settings');
24
map.container('container');
25
map.draw();
26
});