All examples By author By category About

ndarville

World Map

(This chart is a part of the d3-charts collection available here.)


This chart lets you plot countries on a world map, either with a single colour or with a colour gradient mapping to corresponding values. You can see an example of the multicolour version here.

The chart displays the countries who were represented at the Paris rally January 11th 2015.

However, the chart returns an error for the following countries at present:

Usage

Here is an example of the settings for a chart with one colour:

var dataset = "data.csv",
    countryValue = "Country",
    colors = ["#d7191c", "#2b83ba"],

    // Config only for multicolour chart
    multiColor = false,
    dataValue = "",
    min = "",
    max = "",
    useLogScale = false,
    showLegend = false;

Here is an example of the settings for a chart with multiple colours:

var dataset = "data.csv",
    countryValue = "Country Name",
    colors = ["#d7191c", "#2b83ba"],

    // Config only for multicolour chart
    multiColor = true,
    dataValue = "2013", // ""
    min = 0, // ""
    max = 14877, // ""
    useLogScale = true,
    showLegend = false;

The following config variables are only for the multicolour chart only: