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.
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, supply the text you would like to display in your annotation, followed by two colons (::) and the point in time or value you would like to display it at. This point in time or value will have to match the column or row name in your dataset.
- You can also specify the color of the line highlight by specifiying 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, supply the text you would like to display in your annotation, followed by two colons (::), the point in time or value you would like to start displaying it, two "greater than" signs (>>) and the point in time you would like to stop displaying it. These points in time or value will have to match the column or row name in your dataset.
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
- Tweaking the annotations/highlights
- There are several tweaks you can make to display your highlights differently.
- If you just want a line and no text, for example, you can just put a space followed by two semi colons and the point in time or value. Similarly, if you just want the text and not the line, you can change it to zero.
- If you'd like a solid line, you can select a dash value of zero, and if you'd like it to display more like dots, you can select a value like 7.
- You can select to change the colour of your line, range and text, and when adding range highlights, you can change the opacity. If you'd like it to be opaque, you can supply a value of 1.
- 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.