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
3
// This sample uses 3rd party proj4 component
4
// that makes it possible to set coordinates
5
// for the points and labels on the map and
6
// required for custom projections and grid labels formatting.
7
// See https://docs.anychart.com/Maps/Map_Projections
8
9
var data = [
10
{id: "AU.CT", value: 15, title: "Australian Capital Territory"},
11
{id: "AU.VI", value: 23, title: "Victoria"},
12
{id: "AU.WA", value: 86, title: "Western Australia"},
13
{id: "AU.QL", value: 16, title: "Queensland"},
14
{id: "AU.NS", value: 32, title: "New South Wales"},
15
{id: "AU.NT", value: 64, title: "Northern Territory"},
16
{id: "AU.TS", value: 28, title: "Tasmania"},
17
{id: "AU.SA", value: 45, title: "South Australian"}
18
];
19
20
var map = anychart.map();
21
map.geoData(anychart.maps.australia);
22
map.choropleth(data);
23
24
grids = map.grids();
25
grids.enabled(true);
26
// configure grid strokes
27
grids.stroke("Black", 1, "5 5");
28
grids.minorStroke("Black", 0.2);
29
30
map.title("Map Parallels and Meridians Grid Lines Configured");
31
map.container("container");
32
map.draw();
33
});