5 Replies Latest reply on Jan 31, 2011 10:29 PM by James Baker

    Scaling y-axis on a line graph

    . swied

      I have been using Tableau since version 4.1, so I feel like I know my way around the application.  I have an issue that seems simple in nature, but I can't figure out how to solve it.

       

      My ultimate goal is to create a dashboard with some sparklines that trend over time.  Some of my measures don't change much on a percentage basis, so they look like flat lines when I plot them on a line graph.  For example, a customer cross-sell ratio only changes by a few basis points from month-to-month.  A slight change, up or down, is a big deal.  I want to create a single table with several graphs going down the page.  I tried to edit the axis, and select "Independent Axis Ranges for Each Row or Column."  When I do this, the measures that change significantly percentagewise look nice.  The less volatile measures look like straight lines.

       

      Here is an example of my problem:

       

      - In Excel the default scaling is set to show the whole range of values in a graph (see attached file titled excel.jpg).

      In

      - Here is how the same data looks when I plot it in Tableau (tableau.jpg).

       

      I want Tableau to scale my graph the way Excel does it.  Is this possible?

       

      Thanks in advance for your help.

        • 1. Re: Scaling y-axis on a line graph
          James Baker

          Tableau bases its automatic number axes at zero because that's the most honest way to do it.  You can set an axis range to what Excel does manually, of course, but you have to do it yourself.

           

          A few thoughts on making a big deal out of a slight change:  Have you tried using Difference style Table Calculations?  Doing an absolute difference from first would give you a scale (with zero as the starting point) that covered the range of the (percentage small, magnitude large) changes.  You could also experiment with Percentage Difference calcs, depending upon what's important - maybe magnitude for some graphs, and percentage for other.

          • 2. Re: Scaling y-axis on a line graph
            . swied

            I understand your concern, but it would be nice to have an option to have Tableau automatically limit the axis to the range of the data -- as Excel does.  I got an idea after reading your comment about using table calculations.  I did a table calculation to show the difference from the first value in the Table (Across).  I then put the original metric in the Text mark, and set Mark Labels to Line Ends.  It's kind of a wonky work around, but it serves my purpose.  The main drawback to this method is that you have to hide the axis.  See the attached image below.

             

            Thanks,

             

            --Scott

            • 3. Re: Scaling y-axis on a line graph
              James Baker

              I agree that it'd be nice to have more axis options.  Nice workaround.

              • 4. Re: Scaling y-axis on a line graph
                guest contributor

                Does the new version (Tableau 6.0) include more axis options? I need the range of the vertical axis to be automatically set so that the charts show "Y values" from minimum to maximum value (as opposed to from 0 to maximum.) Please advice if this new feature is now available.

                Thnak you,

                Carlos

                • 5. Re: Scaling y-axis on a line graph
                  James Baker

                  Yes, Carlos, version 6 includes a "Do not automatically include zero" checkbox.

                  2 of 2 people found this helpful