In order to create the different coloured bars between the metrics we are going to create separate polygons. The first step is to create a basic line chart showing both of the metrics over time which should look like this: 2. Then the Round field will be our X axis (the overtime element). The Metric & Values field are what we are going to be comparing (the two different lines). The data is structured in the following way, and I have highlighted the main fields that we are going to be using: Using the data from Tim’s Block Shade example would work here too. Don’t worry too much about understand the data, I’ve used it as it shows the switch over so we have some different colours. In this blog, I will use polygons to create bars within the shaded region to show the difference between our two metrics at the same point: The Techniqueįor this example, I’m going to use football data that takes a look at the change in Expected Goals for Sheffield United since they were promoted to the Premier League (Data is from ). However, if we wanted to take this a step further and have the shading change depending on the size of change, we need to think about this in a slightly different way. How to achieve this technique is covered in the great blog post from Tim Manning which can be found here. There are a couple of options, we could just have a single block colour to highlight the difference as shown in here: In Tableau there is no native way of doing this so we need to get a bit creative in order to achieve the desired effect. One way of doing this is to shade the area between the two lines which helps to highlight the difference. When comparing different values over time, it is sometimes good to see how the two metrics differ from each other and to highlight the change. | Tom Prowse How to Shade Between Two Lines in Tableau
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |