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
// This sample uses 3rd party Proj4js JavaScript library to transform coordinates
3
// See https://docs.anychart.com/Maps/Map_Projections to learn more.
4
5
var dataSet = anychart.data.set([
6
{id: 'AU.CT', size: 15, title: 'Australian Capital Territory'},
7
{id: 'AU.VI', size: 23, title: 'Victoria'},
8
{id: 'AU.WA', size: 86, title: 'Western Australia'},
9
{id: 'AU.QL', size: -16, title: 'Queensland'},
10
{id: 'AU.NS', size: 32, title: 'New South Wales'},
11
{id: 'AU.NT', size: -64, title: 'Northern Territory'},
12
{id: 'AU.TS', size: -28, title: 'Tasmania'},
13
{id: 'AU.SA', size: 45, title: 'South Australian'}
14
]);
15
16
var dataSetForSeries = dataSet.mapAs({id: 'id'});
17
18
var map = anychart.map();
19
map.geoData(anychart.maps.australia);
20
21
var series = map.bubble(dataSetForSeries);
22
series.displayNegative(true);
23
24
// Set negative fill.
25
series.negativeFill(['#3F51B5', '#C5CAE9'], 90, true, 0.5);
26
27
map.title('Set negative fill as a linear gradient');
28
map.container('container');
29
map.draw();
30
});