Chapter 27. 3 Ways to Make Splendid Slope Graphs: Tip 3
How to Add Vertical Lines to Connect Slope Graphs
In the last tip of this series, I share a couple of formatting hacks that allow you to draw vertical lines on the x-axis of a slope graph view. The approach is different depending on whether your x-axis is being drawn with a discrete or continuous field, so for the first example, we continue building on the slope graphs we used in Chapters 25 and 26. Note that the Month of Order Date dimension in the last image is blue, indicating that it is drawing discrete headers as columns for each month on the view.
To create vertical lines, double-click the Rows Shelf and type MIN(1):


Next, remove all fields from the new row’s Marks Cards, change the mark type of the second row to Bar, and convert the two rows into a dual-axis combination chart:

Now fix the axis range on the right by right-clicking it and then, on the menu that opens, choose Edit Axis. That opens this dialog box, where you then update the range so that it goes only from 0 to 1:

The bars are now your vertical lines! ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access