How to customize your color legend

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

Depending on if you use a stepped or a continuous color scale or categories, you have different ways to customize it. 

Give your legend a title & the correct number format

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.

Options for categorical color legends

If you want to map categories (e.g. parties or industries), the legend options are fairly simple. Besides giving your key a title, you can also change the order of legend items – just drag them where you want them to be. You can also change  the label text:

Options for stepped color legends

If you choose "steps" as your color scale type, you'll find three ways of labelling your map legend: 

ruler The ruler shows your step colors next to each other and the numbers below. Note that the smallest and highest value are not shown:
ranges This is how the ranges look like when you chose "above map" or "below map" as the position (hidden in "more options"): If you display your map labels on the map (every other position), the ranges will look like this: 
custom The custom legend works like the ranges legend (including the different ways of showing it). The difference is that you can change the labels to your needs. To do so, click on the labels to rename them:

To change the number of steps, the size of the steps or their colors, visit our article "How to customize stepped map colors".

Options for continuous color legends

If you choose "continuous" as your color scale types, your labels can show the range or can be custom: 

range The range shows the numbers you defined in "Custom range" further up when defining the color. 
If you set a center value, it will turn up, too.  
custom In a custom legend, you can type in a text that wull appear at the beginning and at the end of the scale.  If you set a center value further up when defining the color, you'll be able to set a center text, too:

Now let's talk about what hides under "more options": 

Enable highlighting on hover

When you click on "more options", you'll get a few more settings. The first one lets you "Enable highlighting on hover":

Turn it on to let your readers explore the regions that correspond to certain parts of the legend, and the other way round:

Position your map legend

Most of the options in "more options" let you position your map legend differently: No matter which map legend type, you can change its orientation from horizontal to vertical.

Defining the size of your legend is especially helpful when you want to show lots of steps and the numbers would be too cramped otherwise. 

You can also define to set the position differently, from top left and top right to bottom left and bottom right. If you do so, make sure to use the map padding down in Appearance to move your map next to the legend:

And you can use the offset option to move your map further into the map area. That makes sense if you want to some white space on your map: