5 Replies Latest reply on Feb 2, 2016 7:53 AM by David Bussman

    Stacked Area and Stepped Line Charts

    Richard Leeke

      I know they are often frowned on, and I agree that they can be very misleading - but there are times when a stacked area chart can be a really effective representation, IMHO.  Often when I want one of these I also want it to be "stepped" (i.e. representing measures that have constant values for a period and then a discrete delta corresponding to an event).  A stepped line representation is also often useful.

       

      It is just possible to cajole Tableau into generating stepped lines and stepped/stacked areas, but it's really quite difficult to do and the result isn't very satisfactory - especially for the area views (I do it using polygons, but highlighting, tool-tips, etc. don't really work very well).  "First-class citizen" support would be nice.  One day.

       

      I have a classic example that I'm working on at the moment.  I'll just briefly outline what I'm doing, both as an example of why I think there's a case for this chart type and also to see what other ways anyone can suggest of representing this data.

       

      I'm analysing the performance of transactions in a system.  Each transaction consists of a series of activities.  I have the start and end time for each activity for each transaction.

       

      Large numbers of transactions may be in flight concurrently.  I'm trying to understand the queuing behaviour.

       

      One of the many visualisations I'm using is a stacked area chart showing the number of instances of each activity (colour) in flight over time.  One of the the main reasons for wanting the measures stacked is that the overall height of the stack represents the total number of transactions in flight at the time.  I need area rather than just stacked bars because the spacing of the events (activity start and completion) is very non uniform, so I need to use a continuous time axis.  Using bars, the gaps between bars give the impression of no activity, whereas really they represent no visible change of state, but the system may be very busy.

       

      I also find a small-multiples view with "stepped" lines quite effective - but with quite a few values for the "multiples" dimension, it can be hard to see the time correlation clearly.  Also, the overall number of concurrent transactions is very hard to see, whereas it's much clearer on the stacked view.

       

      I've attached a couple of images showing the stepped/stacked area and the stepped line views I've managed to come up with.  I've also got lots of other views (scatters and gantt charts are both very effective for this sort of analysis), but I'd be interested to hear anyone's thoughts on other ways of visualising the concurrency - especially if they don't require quite so much effort as these did.  (The source data is in 6 tables with a few thousand rows but the stacked area view uses a 350 line custom SQL statement with 8 UNIONed clauses and a total of 72 table instances returning over half a million rows to get the steps and stacking to work - and I still can't quite get what I want due to the Jet issue I just posted about on the Datasources forum.)

       

      Can anyone suggest any other effective (but easier) ways of conveying concurrent activities like this?

        • 1. Re: Stacked Area and Stepped Line Charts
          Alex Blakemore

          I'd like to second Richard's request for stepped line charts and stacked area charts. We run into the need for this all the time, when analyzing data that changes at discrete, but non-uniform, instants in time. Tracking  changes in balances on accounts, changes in inventory or staffing profiles, events in discrete-event simulations, network monitoring, experiment or sensor input: all could use step line or area charts.

           

          The current Tableau approach of interpolating between data points gives a distorted view in cases like this - and the summary statistics don't work out correctly either (.e.g. the average inventory level should be weighted by the number of days at each level, not by the number of data points) The workaround is to synthesize data at some fine level of granularity to simulate stepwise changes. That gets cumbersome and slow.

           

          I absolutely love using Tableau, but really miss this feature. I've been requesting it since Tableau version 1, but other (admittedly useful) features always seem to jump in front. I would expect it would be simple to have on option on the mark window - if the mark type is line, allow the user to choose whether to connect points by straight lines or by step functions. That would at least allow a more meaningful visualization - even if it didn't provide a better way to compute meaningful statistics.

          • 2. Re: Stacked Area and Stepped Line Charts
            Richard Leeke

            Your comment about calculating statistics appropriately got me thinking, Alex.

             

            I think the new Tableau 6 Table Calculation options will provide a good answer for that issue - you can easily calculate the difference between adjacent marks in a series and use that in a weighted average calculation.  That will let you calculate either the area under the stepped or the interpolated line - which is effectively what you want for weighted averages.

             

            (When I say "easily" I mean assuming you can get your head around how Table Calculations work - I'm still struggling with that at the moment - but I understand what they let you do.)

             

            So I think the main issue is that direct support for these two visualisation styles would be nice sometime.

            • 3. Re: Stacked Area and Stepped Line Charts
              James Baker

              I'll vote for those charts too. :-)

              • 4. Re: Stacked Area and Stepped Line Charts
                Richard Leeke

                Hey if the voting goes in proprtion to the number of posts on the forum I think we just carried the motion between us, James.

                 

                It is a democracy, isn't it?

                • 5. Re: Stacked Area and Stepped Line Charts
                  David Bussman

                  For those looking at this post now, it appears that Tableau does have a solution. I was able to achieve a stepped chart in 9.0. I have a date time field in Columns that had been converted to continuous. In the columns pane, I clicked on Show Missing Values. I was using two running total calculations in the Rows pane.

                  1 of 1 people found this helpful