The Line Jumper Chart: Combining a Standard Line Chart with a Slope Chart
I recently released my 200th viz which was all about the words spoken by the four main characters in Seinfeld. As part of this viz, I showed the percent of total words spoken by each character by season. The original version of the chart looked like this.

I am very iterative in my design process and often try several dozen charts before deciding on the best option. So my next consideration was to strive for simplicity. So I decided to try a slope chart, which is basically the same chart as above, but just using the first and last value. It looked similar to the following:

Okay, let's look at these charts next to each other.

Which one is better? The line chart shows the full path from start to finish and everything in between. The slope chart, well it basically jumps to the end of the line. So the line chart is more detailed, but the slope chart is super simple and gets right to the point.
So which one should we use? This was my dilemma. I really liked the story that both of them told. So, I decided to combine them into one chart, something that I am calling the Line Jumper Chart.
Before we walk through how to build it, here is what it will look like in the end. I chose to focus most of the ink on the line chart itself and add to the story with a faded, dotted slope chart. Honestly, I think this works really well and provides just a bit more insight than either chart would on their own.
Building this is actually quite simple. First, create a normal line chart. Next create a calculated field that utilizes fixed LODs to grab only the first and the last values of your X axis, in my case, "Season":
IF [Season] = { FIXED : MIN([Season])} OR [Season] = { FIXED : MAX([Season])}
THEN [Season]
ELSE NULL
END
Place this calculation on Columns; in my case, it will be placed next to Season. It should create a slope chart as shown below:

Change the slope chart to use a dotted line (which came out in 2023.2) and reduce the opacity. Then simply create a dual axis and synchronize. And that's it! Super simple!
Not only does this chart provide just a bit more context, it also gives you some additional flexibility for labeling due to the dual axis. In my example (which you can access here), I labeled the start of the line chart with the characters' names and percentages. On the slope chart, I labeled the end of the line with just the percentages.
Alright, that's it. A nice chart that is simple to build! I hope to start seeing some of them out in the wild!
This is really cool. A tradeoff isn't an option here. Thanks for sharing!
ReplyDeleteThank you very much, Sammy!
Delete