Show Me How: Continuous Lines
This post in the ’Show Me How’ series of The Information Lab discusses continuous lines. Being a line chart, it is used to display the development (trend) of a phenomenon over time. What do we need exactly for a continuous line chart? Tableau’s ‘Show Me’ panel tells us that the essential ‘ingredients’ are a date field and a measure.
The foundation of the continuous line chart is a continuous date field. In Tableau we can show dates in discrete and continuous way. What is the difference? A discrete date field is a blue pill and it creates a header in your view whereas a continuous date field (green pill) draws an axis. We will talk more about discrete lines in an upcoming blog post so let’s revert to continuous lines. The simplest way to create a continuous line chart is just to ctrl + select a date field and a measure in the data window and then click on continuos lines in the Show Me panel. Tableau will automatically draw the chart for you. Let’s see a tangible example built on the Superstore dataset that is shipped with Tableau.
The date field appears in the view as a hierarchy, indicated by the leading + sign. Clicking on it you can drill-down to quarters, months, weeks or days, depending on the granularity of data. What if you drilled down to the day level and you just realized that the trend should be illustrated by month? Your date pill looks like this:
You only need to click on the pill and select ‘Month’ in the pop-up context menu. In the image below I framed the discrete date parts in blue (top block) and the continuous date parts in green (bottom block).
I end this part about continuous date fields by adding that if you are not relying on ‘Show Me’ but build the chart from dragging fields one-by-one in the view, just drag the date field onto the Columns shelf with a right click. Then Tableau asks how you want the date field to be displayed. Notice that Tableau marks the discrete items (upper block) with blue icons and the continuous items (bottom) with green ones.
We have arrived to the basic continuous line chart with a date field and one measure:
You may enrich the visualisation depending on the data content that needs to be represented.
Adding a dimension on the Colour button on the Marks card will split the values of the measure by the dimensions members (I add now ‘Department’):
Alternatively, a continuous line chart is a great way to show multiple time-trended measures (with similar range of values) in the same view. Just drag the second measure on top of the vertical axis created by the first measure until you see the little icon appearing (show in the below image), then drop the field.
Tableau will then automatically arrange the view and display the Measure Names – Measure Values pills.
This is the gist of continuous lines, it is really simple and within a few clicks’ reach – well, it is easy to get used clarity and speed when you are working with Tableau.