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
$.ajax({
3
type: "GET",
4
5
// Specify link to an SVG file.
6
url: "https://cdn.anychart.com/geodata/2.2.0/countries/australia/australia.svg",
7
success: function (data) {
8
var chart = anychart.map();
9
10
// Set data as an SVG.
11
chart.geoData(data);
12
13
chart.choropleth([
14
{id: "AU.CT", value: 15, title: "Australian Capital Territory"},
15
{id: "AU.VI", value: 23, title: "Victoria"},
16
{id: "AU.WA", value: 86, title: "Western Australia"},
17
{id: "AU.QL", value: 16, title: "Queensland"},
18
{id: "AU.NS", value: 32, title: "New South Wales"},
19
{id: "AU.NT", value: 64, title: "Northern Territory"},
20
{id: "AU.TS", value: 28, title: "Tasmania"},
21
{id: "AU.SA", value: 45, title: "South Australian"}
22
]);
23
24
chart.title("Set data as an SVG element.");
25
chart.container("container");
26
chart.draw();
27
}
28
});
29
});