Dashed and Dotted Line Patterns

In this post we’ll have a quick look at this new formatting feature shipping in 2023.2 that is currently in the public beta and might already be available to you if you are using Tableau Cloud, depending on your location.

Introduction

Previously, to create anything other than a solid line mark required some type of workaround such as overlapping marks. This feature adds a new Line Pattern option that can be found underneath the Line Type option, both of which are accessible from the Path shelf on the marks card:

Solid, dashed and dotted line patterns

Below is an example of each line pattern with each line also having a forecast applied, purely for demonstration purposes:


Note that three measures are used. It’s not possible (in the beta at least) to add a dimension to the Path shelf to apply a different Line Pattern to each member of that dimension. Any dimension applied to the Path shelf encodes the path of the line as in prior versions and has no formatting impact.

Using two line patterns in one chart

Different Line Patterns can be combined, however, using a dual axis chart as shown below. A different Line Type has also been used for each measure:

  • Profit: Line Type is Step and Line Pattern is Solid
  • Sales: Line Type is Linear and Line Pattern is Dotted

Split one measure by a dimension

With a similar dual axis construction, it’s possible to split one of the measures by a dimension, Region in this case, and apply a different Line Pattern to the target measure used in this example: 

Increased size lines

As you might expect the dotted and dashed effect becomes more pronounced when the size value is increased:

Summary

It’s always nice to see additional formatting features – and also to say goodbye another workaround! It might be useful at times to be able to define the Line Pattern using a dimension instead of having a fixed Pattern per measure. That said, for most use cases, I think this works well.

Finally, a reminder that this content was created using the 2023.2 beta version so there is no guarantee the feature will ship exactly as is described here and I will make updates upon the final release if needed.

Be notified of new content…

If you find these Tableau tips and tutorials useful, you can follow me on LinkedIn for all the latest content.

Thanks,
Marc

The recent release of Tableau 2024.1 includes an update to spatial buffers and you can now create these buffers around line string objects.

Click here to learn more…

Comments are closed.

Create a website or blog at WordPress.com

Up ↑