How to create range highlights and reference lines

Range highlights (also called reference bands) set the focus on certain parts of your x- or y-axis. They appear as rectangles covering the full width or the full height of the chart. They're great to lead your audience's attention to a certain time or value range in your chart – either because what happens inside is unusual (a recession, a war, missing data, projected data, etc.), or because it covers an acceptable range (normal blood pressure, a confidence interval, etc.). You can also use them to separate one era or period from another.
Reference lines are lines in your chart that highlight thresholds/benchmarks (a target, a baseline, a competitor's figure, etc.) or mark events (a date where a policy changed or product launched, for example).
This article explains how to create them.
Contents
- Adding ranges and lines
- Changing the orientation
- Changing the placement
- Changing the color and opacity
- Changing the width and style of lines
- Assigning to a panel (or all)
- Deleting and duplicating
Adding ranges and lines
You can add both range highlights and lines in all kinds of Datawrapper bar charts, column charts, line charts, area charts, scatter plots, as well as in dot, range, and arrow plots.

Go to step 3: Visualize and navigate to the Annotate tab. Then scroll all the way to the bottom of the available options to Highlight range.
Click on Add range highlight, then place it directly in the chart. To add a line, simply click on the chart. To add a range, click and drag (hold the mouse) to another point, then release:
Every range or line you create will appear in the list below the Add range highlight button.
If you want to switch from a line to a range or the other way around, select it in that list and choose another Type in the settings that open. If you do so, ranges will collapse to their start point to become a single line. When changing lines to ranges, the original line position will become the new ranges' start position.
Don't worry about getting the placement or orientation right at the first try. You can still change both after setting your range or line:
Changing the orientation
In bar charts and dot, range, and arrow plots, you can only place vertical range highlights and lines. In all other chart types, you can set both vertical and horizontal ranges and lines.
To change the orientation from vertical to horizontal or the other way around, select a range or line and click on the unselected (=white) button next to Orientation. The button shows you a tiny preview of what your line/range looks like in each orientation.

Changing the placement
To change the position (for lines) or start at end point (for ranges), the easiest way is to simply drag them around.
If you hover over a range, you'll see a pink point in the center and two pink handles on either side of the range rectangle.
Drag the center point to move the range around (to the left and right if it has a vertical orientation, or up and down if it has a horizontal orientation) while keeping its width and height.
Drag one of the pink handles to the left and right (or up and down) to change the position of the start and end point – and hence the width (or height) of the range.
If you hover over a line, you'll only see a pink handle in its center. Drag the line around (to the left and right if it has a vertical orientation, or up and down if it has a horizontal orientation) to move it.
Depending on which control you used last, you might have to first click on your range or line to see the pink handles.
While dragging around is the easiest way, it's not the most accurate one. For most charts, we recommend that you set the line position and range start/end points by typing in an exact number. To do so, select your range or line, then adjust the Position(s):
Changing the color and opacity
You can change the color and opacity of both your range highlights and reference lines.
For ranges, we recommend choosing either a very light color, or decreasing the opacity by a lot. Ranges usually cover a lot of space in your chart, but they're rarely the most important elements. Tone them down by making them light and desaturated so that they get the appropriate attention.

Lines take so little space they can often handle a darker, more opaque color – depending on their importance.
Ranges appear at the very back of your chart — behind all data elements, gridlines, and reference lines. Lines appear on top of your data elements and gridlines. Annotations are always rendered on top of both ranges and lines.

Changing the width and style of lines
If you select a reference lines in the list of ranges and lines, you'll find the option to change the line width and the line style.
Line width: By default, your line is 1 pixel thick. You can increase the line width to 2px (middle option) or 3px (option on the right).
Line style: By default, your line is solid. You can make your line dotted (middle option) or dashed (option on the right).
Like the color and opacity, the line width and style can determine how attention-grabbing your line becomes. A thicker line will be more important than the default 1px line, especially if it's only dotted. We recommend playing around with those settings to see what feels like the right level of importance.

Assigning to a panel (or all)
If you've created a range highlight or reference line in a chart that has different sections or "panels" – like a grouped bar chart, dot plot, range plot, or arrow plot; or a multiple lines or multiple columns chart – then you can move your highlights between those panels. To do so, select your range or line in the list, then select the right panel next to Panel:

To repeat the range or line in all panels at always the same position, click on Repeat in all panels:

Deleting and duplicating
If you select a line or range highlight in the list or directly in the chart, you'll be able to duplicate it or delete it at the bottom of the options that open:

You can also delete a range or line simply by clicking on the little trash bin icon next to it in the list itself:
