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_1 = [
10
{id: "AU.CT", value: 15, fill: '#33CC33'},
11
{id: "AU.VI", value: 23, fill: '#33CC33'},
12
{id: "AU.NT", value: 64, fill: '#99FF66'},
13
{id: "AU.TS", value: 28, fill: '#99FF33'},
14
{id: "AU.SA", value: 45, fill: '#FFFF66'}
15
];
16
17
var data_2 = [
18
{id: "AU.WA", value: 86, fill:'#99CC00'},
19
{id: "AU.QL", value: 16, fill:'#CCCC00'},
20
{id: "AU.NS", value: 32, fill:'#FFCC66'}
21
];
22
23
var map = anychart.map();
24
map.geoData(anychart.maps.australia);
25
26
var firstSeries = map.choropleth(data_1);
27
firstSeries.stroke(null);
28
29
var secondSeries = map.choropleth(data_2);
30
secondSeries.stroke(null);
31
32
map.container("container");
33
map.draw();
34
});