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
// data
10
var data = [
11
{'id': 'GB.DU', 'size': 3},
12
{'id': 'GB.HI', 'size': 1}
13
];
14
15
// create map chart
16
var map = anychart.map();
17
18
// set geodata using https://cdn.anychart.com/geodata/2.2.0/countries/australia/australia.js
19
map.geoData(anychart.maps['united_kingdom']);
20
21
//create bubble series
22
var series = map.bubble(data);
23
24
// set max and min bubble sizes
25
map.maxBubbleSize(35);
26
map.minBubbleSize(10);
27
28
// set container id for the chart
29
map.container('container');
30
31
// initiate chart drawing
32
map.draw();
33
});