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: 'FR.AO', title: 'Strasbourg', value: 928},
7
{id: 'FR.AC', title: 'Bordeaux', value: 192},
8
{id: 'FR.AR', title: 'Lyon', value: 963},
9
{id: 'FR.PL', title: 'Nantes', value: 266},
10
{id: 'FR.BF', title: 'Dijon', value: 518},
11
{id: 'FR.BT', title: 'Rennes', value: 324}
12
]);
13
14
dataSet.mapAs({id: 'id'});
15
16
var franceMap = anychart.map();
17
franceMap.geoData(anychart.maps.france);
18
19
var series = franceMap.choropleth(dataSet);
20
21
franceMap.title('Scales point');
22
franceMap.container('container');
23
franceMap.draw();
24
25
var point = series.getPoint(4);
26
// Scales point.
27
point.scaleFactor(0.0006);
28
});