How to add axis highlights
This help doc covers adding annotations (axis highlights), to your Line, bar, pie and Scatter charts. For information on axis highlights in the Bar chart race template, head over to this help doc.
In this article
To create annotations/axis highlights in the Line, bar pie and Scatter templates:
Go to the Annotations settings and select to add x axis highlights, y axis highlights, or both. X axis annotations will give you vertical highlights, while y axis annotations will give you horizontal highlights.
- Line highlights
Adding a line highlight will give you a vertical or horizontal line in your visualization. Use a line highlight to focus on a single point in time.
To add a line highlight, use the following syntax:
Label :: 01/10/2020. The value after the double colon (::) tells the template where on the axis the highlight should be positioned. If this is a date, it should follow the same format as displayed in the datasheet.
TIP: For an axis highlight without a text label (just the line), leave the first part of the syntax blank. For example,
- You can also specify the color of the line highlight by specifying a color after the point in time or value. Here's an example:
2008 crisis >::Apr-08::#fea313 COVID-19 >::Feb-20::#ffa8b1
- Range highlights
Adding a range highlight will highlight a range in your visualization. Use range highlights when you want to highlight an extended period of time.
To add a range highlight, use the following syntax:
Label :: 2013 >> 2015. The values on either side of the
>>tell the template where the range highlight should start and end. Again, these values should be formatted in the same way as they are displayed in the datasheet.
You can also specify the color of the range highlight by specifiying a color after the range of times or values. Here's an example:
Lockdown :: 2020-03-23 >> 2020-05-28 :: #ffa8b1
- Per-facet highlights
- When you've created a grid of charts, you might want to annotate each grid of charts separately.
- To do this, you will need to use almost the same syntax as for specifying a specific color for your axis and add the facet with which you would like the highlight to display. Here's an example:
A facet-specific highlight :: 2013 :: #000000 :: Column 1 A facet-specific range highlight :: 2013 >> 2015 :: #3437c9 :: Column 4<br>
- Styling axis highlights
- Under the Annotations settings, there are several options for styling axis highlights.
- For Line highlights, you can adjust the color, width, and dash of the line.
For Range highlights, you can change the color, opacity, and texture of the range. There are four textures available: fill, diagonal stripe, grid, and dots.
TIP: You can use range highlights with textures to create textured bars, columns, and areas. Find out more in this help doc.
There are also options for the text labels of your highlights, including positioning, font size, font weight, color, and shadow. Also, use the Max width setting to adjust when the text should spread onto multiple lines.
- Story annotations
- You might want to add annotations to your line, bar or scatter chart for more flexibility in positioning, adding selective data labels, and more.
- Here's an example of annotations in a Scatter visualization:
- You can learn more about adding annotations in this help doc.