How to create a custom map key

Once you created a choropleth or symbol map and set the colors, you can define a color key for your map. The map key is crucial for your readers to understand what the colors in your map mean.


The map key: Basic features

The feature is located in: Maps > Choropleth > Refine. Per default, Datawrapper will automatically create a map key for you. First, you can give it a title

If your titles are too long, you can add HTML tags in between that break the lines. E.g. "Share of <br>people using <br>the internet". Where you write <br>, your title will break.

The number format should match the format you're actually using. If you use percentages, set the number format to "0%" instead of writing "...in percent" in your title. 

Finally, the position should be set so that the map key overlaps the least with the rest of the map. E.g. in a world map, it's recommendable to place the map key in the bottom left (west of South America, in the pacific). 

If you de-select the  "Automatically generate legend" you will see the option to create your own. The custom legend is helpful if you want to set specific thresholds for the data to be displayed. On the left are options to define a value and on the right, you can define the "Caption":

You can click on "Add legend row" to add more values and captions. Let's look at two ways to fill these legend rows.


Custom map key: Single values

The easiest way to create a legend is to use individual values for your values and captions. If you want to let readers know the color of specific values, this is your best choice.

Just add as many legend rows as you need, then experiment with the intervals between your values (e.g. "0, 25, 50, 75, 100", or "0, 20, 40, 60, 80, 100" or "0, 50, 100") to find out what works best. If you use many different colors in your color palette, make sure to increase the number of legend rows. 

Note that Datawrapper won't display anything if you don't set a value. 


Custom map key: Ranges

If you want your readers to know about the average color of ranges, not the exact color for a specific value, then you need to type the average value into the "value" field: 

For example, to show the average color for the range "0-20%", you need to choose the value that's in the middle of your range; in this case "10"

The rest works like with the single values legends: Add as many legend rows as you need, then experiment with the intervals between your values (e.g. "0-50, 50-100" or "0-25, 25-50, 50-75, 75-100") to find out what works best. Here again, if you use many different colors in your color palette, make sure to increase the number of legend rows. 

Still need help? Contact Us Contact Us