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 dataSet = anychart.data.set([
3
{id: 'AU.CT', value: 15, title: 'Australian Capital Territory'},
4
{id: 'AU.VI', value: 23, title: 'Victoria'},
5
{id: 'AU.WA', value: 86, title: 'Western Australia'},
6
{id: 'AU.QL', value: 16, title: 'Queensland'},
7
{id: 'AU.NS', value: 32, title: 'New South Wales'},
8
{id: 'AU.NT', value: 64, title: 'Northern Territory'},
9
{id: 'AU.TS', value: 28, title: 'Tasmania'}
10
]);
11
12
var dataSetForSeries = dataSet.mapAs({id: 'id'});
13
14
var australiaMap = anychart.map();
15
australiaMap.geoData(anychart.maps.australia);
16
australiaMap.choropleth(dataSetForSeries);
17
18
// Hide unbound region.
19
australiaMap.unboundRegions('hide');
20
21
australiaMap.title('Hide unbound region');
22
australiaMap.container('container');
23
australiaMap.draw();
24
});