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):

Image
Image

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:

Image

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:

Image

The bars are now your vertical lines! ...

Get Innovative Tableau now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.