How to add a pattern overlay to choropleth maps

Choropleth maps are great for showing regional patterns, or letting users see how their home region compares to its neighbors. But they have one drawback: They can only show one data point per region. Adding a pattern overlay to your choropleth map allows you to show additional information about regions – for example, if the data is incomplete, from a different source, collected on a different date than in other regions, or somehow else part of a category that makes sense to highlight..

This article explains how to add and style patterns in your choropleth map, and how to add and position a legend for these patterns.

How to add a pattern overlay

To add a pattern overlay to your choropleth maps, go to the Refine tab in step 3: Visualize, and turn on Use pattern overlay.

Datawrapper then asks you to select a column. Here, you have two options: 

We recommend that you include an extra text column in your dataset with the categories you want to display as a pattern, e.g a column for “Data complete?”, with a value of Yes or No for each region:

Then you can select that category column in the pattern settings:

If you only want to show a pattern in a few regions, you can select the column with the names of your regions, and then select and add the pattern overlay one by one:

How to style the pattern overlay

Your map might have tiny regions and really big ones next to each other, with fill colors ranging from almost white to dark night blue. To make sure that patterns are visible in all of these regions and – if you have multiple patterns – distinguishable from each other, you have the following options to define how your patterns should look: 

Type

This is where you define the direction of the stripes. Datawrapper offers four directions: diagonal (top-left to bottom-right), diagonal (top-right to bottom-left), vertical, and horizontal lines. 

For most map regions, the two diagonal lines are the best choice because they don't visually interfere with vertical or horizontal region boundaries.

Most maps will work best with only one or two categories, since it’s hard to distinguish between them. If in doubt, ask a coworker or friend how hard they find it to read your map.

Style (width & gap)

Here you can set the width of the stripes in your pattern and the space between the stripes. This can be useful to help readers distinguish between your categories: For example, it's easier to tell two diagonal patterns apart if one has thicker lines:

You can also use different line widths and gaps with just one pattern type to make categories with an inherit order easier to understand (e.g. “low, medium, high”, or “<50% votes, <100% votes”):

Color

You can choose a  color and opacity for you pattern, which will apply to all pattern: When you change the color in the settings of one pattern, all other pattern will re-color, too. 

You have five color options: auto-contrast, black, gray, white, and the background color. 

By default, auto-contrast ist selected. It automatically adjusts the pattern color to the region color: Your pattern will be darker on brighter region colors and the other way around, guaranteeing good visibility. We recommend it for most maps. 

In case your map colors don’t vary too much in brightness, you may prefer to use one of the fixed color options (black, gray, or white):

The last option, background color, matches the stripes with the background color of your custom design theme. If you're using the Datawrapper theme – for example, on a free plan – the background color of your visualizations is white, so there's no difference between using the background color or the white color.

In dark mode, your colors will adjust automatically no matter what color option you choose. For example, if you use white for your patterns, they'll turn black when you view your maps in dark mode.

Opacity

The opacity defines how prominent your pattern will be on the map. 

Changing the opacity also has an effect on how much the actual region color will be visible and decipherable, as you can see in the two examples above. In general, patterns always change the visual appearance of your colors: A dark pattern overlay will make region colors appear darker, and brighter patterns will make them appear brighter. To limit this effect, our default pattern opacity is only 50%. We recommend keeping the opacity at this level or even lower.

Like the color, changing the opacity of one of your pattern changes the opacity of them all.

How to add and edit a legend for a pattern overlay

To make it easy for your readers to interpret your patterns, legends are crucial. That's why as soon as you add a pattern to your map, it will automatically show up in a legend as well. 

To make edits to the legend, scroll down until Legends > Show pattern legend in the same Refine tab. Here you have the following options: 

To give your legend a title, click on Show legend title, then type the desired legend title in the text box: 

To change the label text in your legend, click on the label in the list of the Show pattern legend settings. You can use HTML formatting to make your labels bold or italic, or introduce line breaks with <br>.

To change the order in which the the labels appear in your legend, drag the patterns around in the list:

To disable some patterns from showing up in the legend, click on the little eye symbol in the pattern legend settings: 

To show multiple pattern below each other instead of next to each other, click on Stack legend items right below the list of pattern:

To disable the entire pattern legend in the rare cases where your patterns are self-explanatory, or when you can explain them nicely with annotations, uncheck Show pattern legen

How to position your pattern legend

As you're used to with Datawrapper color legends in choropleth maps, you can change the position of your pattern legend, and add an offset in certain cases.

Position

When you also show a color legend (like you should in most cases), you can first decide if you want the position to be the same as the color legend, or different. If you select With color legend, the pattern legend will be placed wherever your color legend is. To change the position of both, change the color legend position.  

In that case, you can also decide if the pattern legend should be next to the color legend, or below it:

If you select Custom, you can place the legend in eight different positions independent from the color legend: Above or below the visualization, in the top left, center or right, and in the bottom left, center, and right:

If your map is narrower than 450px, e.g. on mobile devices, offset and most of the position options won't have an effect. Like the color legend, pattern legends will be shown below the visualization, unless you have the Above visualization position selected:

Offset and max width

If you choose a Custom position *and* place the legend in the top left, center, or right, or in the bottom left, center, or right position, you'll be able to define an offset. This means you can move the legend away from the edges of your map, defined in percentage of the total map width or height. 

For example, here's a pattern legend in the top right with 7% horizontal offset and 3% vertical offset:

You'll also be able to define the maximum width of your legend in pixels. This can be helpful to give very long labels more room, or making it possible to fit your legend in some white space on your map.

Be sure to specify the width of the final map (e.g., the width of your text if you are embedding it in a digital article) before fine-tuning the offset and max width. 

Enable highlighting on hover

This setting enables your readers to hover over a region and see the pattern in the legend highlighted that is added to that region. This also works the other way around: If readers hover over an item in the pattern legend, all regions get highlighted that have that pattern added: