3 Replies Latest reply on Sep 10, 2016 1:05 PM by Jonathan Drummey

    Discrete Vs Continuous Timelines - Bar Chart's Behavior

    Rahul Upadhye

      I was curious to know how Bar charts behaves differently : when plotted against a (1) discrete timeline vs (2) continuous timeline.

      Did u face a similar situation ?


      Discrete Timeline Bars: Overall Bars look good, increasing data volume forces the bars to shrink until the gap between adjacent bars is reduced to zero and it gives a feeling of Area chart. Importantly they dont seem to overlap each other giving a good visual pattern.




      Continuous Timeline Bars: Bars are slimmer & continue to shrink further with increasing data volume... bars dont mind to even overlap each other to fit the view
      & this looses the context, to the extent that data is visually misinterpreted.



      Did you face a similar situation?

        • 1. Re: Discrete Vs Continuous Timelines - Bar Chart's Behavior



          If you were to give a longer time period for the date range then you could see a very visible difference between date as Continuous vs Discrete as Continuous will  allow you to see the whole data range in a single view against when the date is discrete as that chart is too long horizontally as every date needs to be distinctively shown.


          Good Luck !!

          2 of 2 people found this helpful
          • 2. Re: Discrete Vs Continuous Timelines - Bar Chart's Behavior
            Shawn Wallwork

            I'm not going to do the full-blown Jonathan Drummey treatment to this, but ....


            There are four pill types:

            • Discrete Dimensions
            • Discrete Measures
            • Continuous Dimensions
            • Continuous Measure


            Understanding how and why each type behaves the way is does, is THE most important thing to understand when trying to learn Tableau.


            Things to know:

            • Discrete pills create 'Headers'
            • Continuous pills create 'Axis'
            • Headers are individual columns (and in your case only show dates with data)
            • Axis show all values between min & max in your data (so in your case it shows the days that don't have any data).
            • There are many options available to one that aren't available to the other (for instance Discrete Headers don't support reference lines and trend lines, where as a Continuous Axis will).


            To my way of thinking the Discrete view actually 'misrepresents the data', as it doesn't show the days nothing was going on. But of course that depends on what you're trying to communicate.


            I'll let Jonathan add his favorite links, to his many posts on this subject. Everyone should read whatever he links to, you will instantly move from beginner to intermediate level Tableau user!





            3 of 3 people found this helpful
            • 3. Re: Discrete Vs Continuous Timelines - Bar Chart's Behavior
              Jonathan Drummey

              Thanks for the kind words, Shawn Wallwork!


              I think there are two things going on here that are a bit overlapping that Shawn and Rahul have identified, I'll explicitly call them out.


              1) Pill type matters, as Shawn described. The archetypal post on this is Tom Brown's post at Blue things and Green things - The Information Lab. Beyond that I'd point anyone reading this at     Understanding Pill Types 5 min What is covered: Why Pill Type Matters Dimensions and Measures Continuous and Discrete Changing Default Pill Types Axis vs Label Color and Maps Date Types Filtering   by Lari McEdward, Round Two:Think Data Thursday ideas |Tableau Community  by Joe Mako, and TDT with Jonathan Drummey - July 10, 2014 |Tableau Community by yours truly.


              2) As much as Tableau tries to do the "right" thing with our data, it's not perfect. So Rahul noted that the continuous axis had overlapping marks, and Shawn pointed out that the discrete headers would be missing dates if the data didn't have a value for every day in the year. It's up to us as analysts and visualization creators to do the final check to ensure that the chosen visualization accurately represents the data, whether that's by ensuring that for discrete headers the data is padded out so that there's a header for every date, or for continuous axes by reducing the line size and perhaps turning off the mark borders.


              2a) Related to that, based on the pill types in the view Tableau's automatic layout algorithm (initially created by Jock Mackinlay) does its best to choose an appropriate visual representation of the data. This algorithm also takes into account the data type of the pills involved. Tableau's default when a date pill is on one of the opposing shelves (Rows or Columns) and a continuous pill is on the other shelf is to draw a line chart. When we change that (which Rahul had to do in order to draw bars in this case) it's up to us as analysts to choose a Mark Type that is applicable to business question we are trying to answer. In this case the fact that both the discrete and continuous versions of this particular view "break" isn't such a big deal to me because (for this view) bars are not a useful choice for answering the kinds of questions I can imagine, there are just too many bars so whatever we do we're going to end up visual interference such as moire patterns.


              I noticed that the screenshots were prepared using Tableau v10 and wondered if Tableau's new mark sizing feature would help here and it doesn't, there are too many marks in the view for mark sizing to be useful. A fundamental problem here is that (assuming there's a mark for every date) the view needs to be some multiple of 365 * N + 364 * M pixels wide where N is the bar width and M is the space between each bars, but we don't have pixel-level control in Tableau and based on the size of the workspace and our display resolution we can run into various issues when making dense displays of bars.



              3 of 3 people found this helpful