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
{id: "AU.SA", value: 45, title: "South Australian"}
11
]);
12
13
var dataSetForSeries = dataSet.mapAs({id: "id"});
14
15
var australiaMap = anychart.map();
16
australiaMap.geoData(anychart.maps.australia);
17
australiaMap.choropleth(dataSetForSeries);
18
australiaMap.axes(true);
19
20
var mapGrids = australiaMap.grids();
21
22
var horizontalGrids = mapGrids.horizontal();
23
horizontalGrids.enabled(true);
24
horizontalGrids.stroke("3 #4CAF50");
25
26
// Set grid zIndex.
27
horizontalGrids.zIndex(anychart.enums.MapGridZIndex.OVER_MAP);
28
29
australiaMap.title("Set grid zIndex");
30
australiaMap.container("container");
31
australiaMap.draw();
32
});