France Map

This interactive map is rendered within the browser using SVG.


<!DOCTYPE HTML>
<html lang="en-US">
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/piximaps.min.css">
    <script src="js/piximaps.min.js"></script>
    <style>
      #chart { width: 540px; height: 540px; box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37); }
      .pixi .charttitle .subtitle { font-size: 0.9em; font-style: italic; text-anchor: start }
    </style>
    <script>
      window.addEventListener('load', () => {
        'use strict';

        // Set the map attributes:
        const map = {
          type: 'geojson',
          url: '/maps/maps/france.json',
          exclude: { gn_a1_code: ['FR.971', 'FR.972', 'FR.973', 'FR.974', 'FR.976'] },
          coordinates: [47, 5.5],
          zoom: 25,
          minZoom: 5,
          maxZoom: 50,
          scrollwheel: false,
        };

        const series = [
          { title: 'Grand-Est', style: { fillColor: '#2196f3' } },
          { title: 'Nouvelle Aquitaine', style: { fillColor: '#00bcd4' } },
          { title: 'Auvergne Rhône-Alpes', style: { fillColor: '#009688' } },
          { title: 'Bourgogne Franche-Comté', style: { fillColor: '#4caf50' } },
          { title: 'Bretagne', style: { fillColor: '#cddc39' } },
          { title: 'Centre Val de Loire', style: { fillColor: '#ffeb3b' } },
          { title: 'Corse', style: { fillColor: '#ff5722' } },
          { title: 'Île-de-France', style: { fillColor: '#607d8b' } },
          { title: 'Occitanie', style: { fillColor: '#f44336' } },
          { title: 'Hauts-de-France', style: { fillColor: '#9c27b0' } },
          { title: 'Normandie', style: { fillColor: '#3f51b5' } },
          { title: 'Pays de la Loire', style: { fillColor: '#b71c1c' } },
          { title: 'Provence-Alpes-Côte-d’Azur', style: { fillColor: '#004d40' }, over: { fillOpacity: 0.7 } },
        ];

        // Define the chart settings:
        const opts = {
          chart: {
            width: window.innerWidth < (540 * 0.8) ? (window.innerWidth * 0.8) : 540,
            height: window.innerHeight < 540 ? window.innerHeight : 540,
          },
          title: { label: 'France' },
          footer: { label: 'Population per department in 2011. Source Insee.', x: 3 },
          legend: { enabled: true, floating: true, shift: { x: -5, y: 5 } },
        };

        const departments = [
          // Alsace, Champagne-Ardenne et Lorraine
          {'FRA-FR-08': {title: 'Ardennes', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '283 110'}}},
          {'FRA-FR-10': {title: 'Aube', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '303 997'}}},
          {'FRA-FR-51': {title: 'Marne', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '566 571'}}},
          {'FRA-FR-52': {title: 'Haute-Marne', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '182 375'}}},
          {'FRA-FR-54': {title: 'Meurthe-et-Moselle', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '733 124'}}},
          {'FRA-FR-55': {title: 'Meuse', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '193 557'}}},
          {'FRA-FR-57': {title: 'Moselle', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 045 146'}}},
          {'FRA-FR-67': {title: 'Bas-Rhin', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 099 269'}}},
          {'FRA-FR-68': {title: 'Haut-Rhin', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '753 056'}}},
          {'FRA-FR-88': {title: 'Vosges', style: {fillColor: '#2196f3', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '378 830'}}},

          // Aquitaine, Limousin et Poitou-Charentes
          {'FRA-FR-16': {title: 'Charente', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '352 705'}}},
          {'FRA-FR-17': {title: 'Charente-Maritime', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '625 682'}}},
          {'FRA-FR-19': {title: 'Corrèze', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '242 454'}}},
          {'FRA-FR-23': {title: 'Creuse', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '122 560'}}},
          {'FRA-FR-24': {title: 'Dordogne', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '415 168'}}},
          {'FRA-FR-33': {title: 'Gironde', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 463 662'}}},
          {'FRA-FR-40': {title: 'Landes', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '387 929'}}},
          {'FRA-FR-47': {title: 'Lot-et-Garonne', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '330 866'}}},
          {'FRA-FR-64': {title: 'Pyrénées-Atlantiques', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '656 608'}}},
          {'FRA-FR-79': {title: 'Deux-Sèvres', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '370 939'}}},
          {'FRA-FR-86': {title: 'Vienne', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '428 447'}}},
          {'FRA-FR-87': {title: 'Haute-Vienne', style: {fillColor: '#00bcd4', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '376 058'}}},

          // Auvergne et Rhône-Alpes
          {'FRA-FR-01': {title: 'Ain', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '603 827'}}},
          {'FRA-FR-03': {title: 'Allier', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '342 729'}}},
          {'FRA-FR-07': {title: 'Ardèche', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '317 277'}}},
          {'FRA-FR-15': {title: 'Cantal', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '147 577'}}},
          {'FRA-FR-26': {title: 'Drôme', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '487 993'}}},
          {'FRA-FR-38': {title: 'Isère', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 215 212'}}},
          {'FRA-FR-42': {title: 'Loire', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '749 053'}}},
          {'FRA-FR-43': {title: 'Haute-Loire', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '224 907'}}},
          {'FRA-FR-63': {title: 'Puy-de-Dôme', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '635 469'}}},
          {'FRA-FR-69': {title: 'Rhône', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 744 236'}}},
          {'FRA-FR-73': {title: 'Savoie', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '418 949'}}},
          {'FRA-FR-74': {title: 'Haute-Savoie', style: {fillColor: '#009688', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '746 994'}}},

          // Bourgogne et Franche-Comté
          {'FRA-FR-21': {title: 'Côte-d\'Or', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '525 931'}}},
          {'FRA-FR-25': {title: 'Doubs', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '529 103'}}},
          {'FRA-FR-39': {title: 'Jura', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '261 294'}}},
          {'FRA-FR-58': {title: 'Nièvre', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '218 341'}}},
          {'FRA-FR-70': {title: 'Haute-Saône', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '239 695'}}},
          {'FRA-FR-71': {title: 'Saône-et-Loire', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '555 999'}}},
          {'FRA-FR-89': {title: 'Yonne', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '342 463'}}},
          {'FRA-FR-90': {title: 'Territoire de Belfort', style: {fillColor: '#4caf50', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '143 348'}}},

          // Bretagne
          {'FRA-FR-22': {title: 'Côtes-d\'Armor', style: {fillColor: '#cddc39', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '594 375'}}},
          {'FRA-FR-29': {title: 'Finistère', style: {fillColor: '#cddc39', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '899 870'}}},
          {'FRA-FR-35': {title: 'Ille-et-Vilaine', style: {fillColor: '#cddc39', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '996 439'}}},
          {'FRA-FR-56': {title: 'Morbihan', style: {fillColor: '#cddc39', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '727 083'}}},

          // Centre
          {'FRA-FR-18': {title: 'Cher', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '311 694'}}},
          {'FRA-FR-28': {title: 'Eure-et-Loir', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '430 416'}}},
          {'FRA-FR-36': {title: 'Indre', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '230 175'}}},
          {'FRA-FR-37': {title: 'Indre-et-Loire', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '593 683'}}},
          {'FRA-FR-41': {title: 'Loir-et-Cher', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '331 280'}}},
          {'FRA-FR-45': {title: 'Loiret', style: {fillColor: '#ffeb3b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '659 587'}}},

          // Corse
          {'FRA-FR-2A': {title: 'Corse-du-Sud', style: {fillColor: '#ff5722', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '145 846'}}},
          {'FRA-FR-2B': {title: 'Haute-Corse', style: {fillColor: '#ff5722', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '168 640'}}},

          // Île-de-France
          {'FRA-FR-75': {title: 'Paris', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '2 249 975'}}},
          {'FRA-FR-77': {title: 'Seine-et-Marne', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 338 427'}}},
          {'FRA-FR-78': {title: 'Yvelines', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 413 635'}}},
          {'FRA-FR-91': {title: 'Essonne', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 225 191'}}},
          {'FRA-FR-92': {title: 'Hauts-de-Seine', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 581 628'}}},
          {'FRA-FR-93': {title: 'Seine-Saint-Denis', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 529 928'}}},
          {'FRA-FR-94': {title: 'Val-de-Marne', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 333 702'}}},
          {'FRA-FR-95': {title: 'Val-d\'Oise', style: {fillColor: '#607d8b', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 180 365'}}},

          // Languedoc-Roussillon et Midi-Pyrénées
          {'FRA-FR-09': {title: 'Ariège', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '152 286'}}},
          {'FRA-FR-11': {title: 'Aude', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '359 967'}}},
          {'FRA-FR-12': {title: 'Aveyron', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '275 813'}}},
          {'FRA-FR-30': {title: 'Gard', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '718 357'}}},
          {'FRA-FR-31': {title: 'Haute-Garonne', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 260 226'}}},
          {'FRA-FR-32': {title: 'Gers', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '188 893'}}},
          {'FRA-FR-34': {title: 'Hérault', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 062 036'}}},
          {'FRA-FR-46': {title: 'Lot', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '174 754'}}},
          {'FRA-FR-48': {title: 'Lozère', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '77 156'}}},
          {'FRA-FR-65': {title: 'Hautes-Pyrénées', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '229 228'}}},
          {'FRA-FR-66': {title: 'Pyrénées-Orientales', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '452 530'}}},
          {'FRA-FR-81': {title: 'Tarn', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '377 675'}}},
          {'FRA-FR-82': {title: 'Tarn-et-Garonne', style: {fillColor: '#f44336', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '244 545'}}},

          // Nord-Pas-de-Calais et Picardie
          {'FRA-FR-02': {title: 'Aisne', style: {fillColor: '#9c27b0', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '541 302'}}},
          {'FRA-FR-59': {title: 'Nord', style: {fillColor: '#9c27b0', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '2 579 208'}}},
          {'FRA-FR-60': {title: 'Oise', style: {fillColor: '#9c27b0', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '805 642'}}},
          {'FRA-FR-62': {title: 'Pas-de-Calais', style: {fillColor: '#9c27b0', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 462 807'}}},
          {'FRA-FR-80': {title: 'Somme', style: {fillColor: '#9c27b0', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '571 211'}}},

          // Basse-Normandie et Haute-Normandie
          {'FRA-FR-14': {title: 'Calvados', style: {fillColor: '#3f51b5', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '685 262'}}},
          {'FRA-FR-27': {title: 'Eure', style: {fillColor: '#3f51b5', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '588 111'}}},
          {'FRA-FR-50': {title: 'Manche', style: {fillColor: '#3f51b5', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '499 531'}}},
          {'FRA-FR-61': {title: 'Orne', style: {fillColor: '#3f51b5', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '290 891'}}},
          {'FRA-FR-76': {title: 'Seine-Maritime', style: {fillColor: '#3f51b5', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 251 282'}}},

          // Pays de la Loire
          {'FRA-FR-44': {title: 'Loire-Atlantique', style: {fillColor: '#b71c1c', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 296 364'}}},
          {'FRA-FR-49': {title: 'Maine-et-Loire', style: {fillColor: '#b71c1c', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '790 343'}}},
          {'FRA-FR-53': {title: 'Mayenne', style: {fillColor: '#b71c1c', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '307 031'}}},
          {'FRA-FR-72': {title: 'Sarthe', style: {fillColor: '#b71c1c', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '565 718'}}},
          {'FRA-FR-85': {title: 'Vendée', style: {fillColor: '#b71c1c', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '641 657'}}},

          // Provence-Alpes-Côte d’Azur
          {'FRA-FR-04': {title: 'Alpes-de-Haute-Provence', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '160 959'}}},
          {'FRA-FR-05': {title: 'Hautes-Alpes', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '138 605'}}},
          {'FRA-FR-06': {title: 'Alpes-Maritimes', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 081 244'}}},
          {'FRA-FR-13': {title: 'Bouches-du-Rhône', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 975 896'}}},
          {'FRA-FR-83': {title: 'Var', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '1 012 735'}}},
          {'FRA-FR-84': {title: 'Vaucluse', style: {fillColor: '#004d40', fillOpacity: 0.75}, over: {fillOpacity: 1}, properties: {Population: '546 630'}}},
        ];

        // Fix the chart dimensions:
        const el = document.getElementById('chart');
        el.style.width = opts.chart.width + 'px';
        el.style.height = opts.chart.height + 'px';

        // Draw the chart:
        Pixi.Map('#chart', map, series, opts).overlayUpdate(departments);

      });
    </script>
  </head>
  <body>
    <div id="chart" class="pixi"></div>
  </body>
</html>
          

Methods

Map Methods

Name Return Description
.Map (id, map, series, options) this Creates, draws and returns the map object.
.moveTo (id, zoom) this Moves the map to get the overlay at the center of the chart (if the zoom parameter is omitted, the map doesn't scale; if the zoom is 'auto', the map is scaled to best fit).
.moveTo ([φ, λ], zoom) this Moves the map to get these coordinates at the center of the chart (if the zoom parameter is omitted, the map doesn't scale; if the zoom is 'auto', the map is scaled to best fit).

Overlay Methods

Name Return Description
.overlayAppend (overlays) this Appends one or more overlays.
.overlayUpdate (overlays) this Updates one or more overlays.
.overlayRemove ([ids]) this Removes one or more overlays.
.overlayDelete () this Removes all the overlays.
.overlayBlink ([ids]) this Starts one or more overlays.
.overlayUnblink ([ids]) this Stops one or more overlays.
.overlaySetVisible ([ids]) this Sets one or more overlays, identified by their id, visible.
.overlaySetInvisible ([ids]) this Sets one or more overlays, identified by their id, invisible.
.overlayAttachTooltip (id, xmlString, width, height) this Attachs a user defined tooltip to a given overlay. The user defined HTML5 tooltip is included in a SVG foreignObject element.

Event Methods

Name Return Description
.addEventListener (type, listener) this Registers the specified listener on the EventTarget it's called on.
.addOneTimeEventListener (type, listener) this Registers the specified listener on the EventTarget it's called on for a one-time event.
.removeEventListener (type, listener) this Removes the event listener previously registered with addEventListener ().
.on (type, listener) this Alias on addEventListener ().
.one (type, listener) this Alias on addOneTimeEventListener ().
.off (type, listener) this Alias on removeEventListener ().

Event Types

Attribute Type Object Info
'overlayover' String OverEvent Fired when the mouse enters on the overlay.
'overlayout' String OverEvent Fired when the mouse leaves the overlay.
'click' String ClickEvent Fired when the mouse clicks the overlay.
'dblclick' String ClickEvent Fired when the mouse double clicks the overlay.

Event Objects

OverEvent
Attribute Type Info
id String The id of the SVG element that fired the event.
title String The title of this SVG element.
style Object The style applied to this SVG element. See the section 'Series Options' for the detail of the style attributes.
properties Object/Array The data displayed by the tooltip when the mouse goes over or leaves this SVG element.
geometry Object The geometry of this SVG element.
ClickEvent
Attribute Type Info
overlay Object The OverEvent object of the (double) clicked overlay.
cursor Array The relative position of the point (double) clicked on the chart ([x, y]).

Map Attributes

map is an object with the following attributes:

Attribute Type Default Info
url String The url of the map file.
origin Object The position of the map against the grid.
origin.x Number 0 On x axis.
origin.y Number 0 On y axis.
zoom Number 1 The zoom attribute.
maxZoom Number 20 The maximum zoom level.
minZoom Number 0.1 The minimum zoom level.
draggable Boolean true Authorizes (true) or prevents (false) the map from being dragged.
scrollwheel Boolean true Enables (true) or disables (false) scrollwheel zooming on the map.
keypad Boolean true Enables (true) or disables (false) the keypad.

If the map object is undefined, the following default map object is processed:

map = { url: '../maps/worldmap.json', origin: { x: 0, y: 50 }, scale: 1 };

Series Options

The series are specified in an array of objects. The serie object has the following attributes:

Attribute Type Default Info
title String undefined The title of the serie.
style Object undefined The style to apply to the SVG elements that belong to the serie. By default, the css style is applied.
style.fillColor String undefined The fill color attribute.
style.fillOpacity Number undefined The color opacity attribute.
style.strokeColor String undefined The stroke color attribute.
style.strokeOpacity Number undefined The stroke color opacity attribute.
style.strokeWidth Number undefined The stroke width attribute.

Chart Options

Attribute Type Default Info
chart Object The chart attributes.
chart.type String map The type of map (currently, 'map' is the only option).
chart.width Number 600 The outer width of the chart.
chart.height Number 420 The outer height of the chart.
chart.grid Object The position and the size of the inner box.
chart.grid.x Number - The inner box origin on the x axis.
chart.grid.y Number - The inner box origin on the y axis.
chart.grid.width Number - The inner box width.
chart.grid.height Number - The inner box height.
chart.grid.margin Object The inner box margins.
chart.grid.margin.top Number 0 The inner box top margin.
chart.grid.margin.left Number 0 The inner box left margin.
chart.grid.margin.right Number 0 The inner box right margin.
chart.grid.margin.bottom Number 0 The inner box bottom margin.
title Object The title attributes.
title.label String The title text.
title.x Number - The horizontal anchor position of the title.
title.y Number - The vertical anchor position of the title.
subtitle Object The subtitle attributes.
subtitle.label String The subtitle text.
subtitle.x Number - The horizontal anchor position of the title.
subtitle.y Number - The vertical anchor position of the title.
legend Object The legend attributes.
legend.enabled Boolean true Enables or disables the legend.
legend.floating Boolean true Enables or not the legend to float above the map.
legend.layout String vertical The legend could be horizontal or vertical.
legend.align Object The legend position on the grid.
legend.align.horizontal String right The legend position on x axis could be: left, right or middle
legend.align.vertical String top The legend position on y axis could be: top, bottom or middle
legend.shift Object The shift position of the legend on the grid.
legend.shift.x Number 0 Moves slightly the legend on the x direction.
legend.shift.y Number 0 Moves slightly the legend on the y direction.
legend.icon Object The icon rectangle size.
legend.icon.width Number 10 The icon rectangle width.
legend.icon.height Number 10 The icon rectangle height.
tooltip Object The tooltip attributes.
tooltip.enabled Boolean true Enables (true) or disables (false) the tooltip.
tooltip.animated Boolean true smoothly moves (true) or not (false) the tooltip from previous item to current.

- means a computed value.

Overlay Attributes

The overlays are specified in an object. The overlays object has the following attributes:

Attribute Type Default Info
'id' String or Number The overlay Id.
'id'.title String undefined The name of the overlay.
'id'.style Object undefined The style applied to the overlay. By default, the css style is applied.
'id'.style.fillColor String undefined The color of the overlay.
'id'.style.fillOpacity String undefined The opacity of the overlay.
'id'.style.strokeColor String undefined The color of the overlay stroke.
'id'.style.strokeOpacity String undefined The opacity of the overlay stroke.
'id'.style.strokeWidth Number undefined The width of the overlay stroke.
'id'.over Object undefined The style to apply to the SVG elements that belong to the serie when the mouse is over the element. By default, the css style is applied.
'id'.over.fillColor String undefined The fill color attribute.
'id'.over.fillOpacity Number undefined The color opacity attribute.
'id'.over.strokeColor String undefined The stroke color attribute.
'id'.over.strokeOpacity Number undefined The stroke color opacity attribute.
'id'.over.strokeWidth Number undefined The stroke width attribute.
'id'.properties Object/Array null A set of data displayed by the tooltip when the mouse goes over the overlay.
'id'.properties[n] String ' ' If properties is an array of string, each string is a line of text displayed by the tooltip over the overlay.
'id'.properties[n] String ' ' If properties is an object, each pair of key/value is a list of items displayed by the tooltip over the overlay.
'id'.geometry Object The geometry of the overlay. It looks like to the GeoJSON specification. See details below for each type of overlay.

Point

The overlay Point has the following geometry attributes:

Attribute Type Default Info
'id'.geometry Object The geometry of the overlay (similar to the GeoJSON specification).
'id'.geometry.type String 'Point' The type of the overlay. Here a 'Point'.
'id'.geometry.radius Number 0 The radius of the 'Point' overlay (not in the GeoJSON specification).
'id'.geometry.coordinates Array [ ] The coordinates [φ, λ] of the center of the 'Point' overlay.