8 Replies Latest reply on Mar 21, 2011 6:32 PM by David Ross

    Condensing the x axis

    David Ross

      I'm just starting to use Tableau (6.0) and I'm working on a line chart with about 50 years of dates (about 13,000 ticks) as the x axis.  How do I adjust the physical width of the chart so I can condense, or squeeze, the entire x axis so that it is shorter (i.e., so that I can see more dates/longer length of the x axis) at one time?

       

      Thank you.

      David

        • 1. Re: Condensing the x axis
          . omomyid

          It sounds to me (without seeing an example) that you have your x-axis dimension set as discrete, you should change it to continuous.

          • 2. Re: Condensing the x axis
            David Ross

            Thanks for responding.  Software is always so frustrating when you are just getting started.  Thankfully, people, like you, are out there to lend a hand!  I tried changing the x axis (Date) from a Dimension to a Continuous Measure, but that didn't seem to help.  I've attached a screenshot of the Sheet view, as well as a Dashboard, which automatically reformatted the chart to fit the screen.  Basically, I want to be able to see any set of continuous dates, whether it's a particular month, set of years, or all 50 years, on one screen.  Does that make sense?

            • 3. Re: Condensing the x axis
              James Baker

              See the "Normal" up on the toolbar? If you change that to "Fit width" (which I believe is what your dashboard is set to), you could then filter your data set (probably using a continuous date range quickfilter) to whatever set you want to look at.

              • 4. Re: Condensing the x axis
                David Ross

                James: thanks for your reply.  I had just solved the problem inadvertantly.  I took Date off the Columns window, When I put it back on, it may have reset the Normal setting, because I immediately had the entire 50 years on display.  Then I added a Quick Filter, so I could select any dates.  Works great screenshot attached)!  My next headache is trying to add some additional data to the same line.  In other words, the current screenshot shows about 10 years of the S&P 500 in blue.  I now want to add another set of data points (RFG In, under Measures) that would show when our one of our investment methods would have had us owning the S&P (so those parts of the blue line would become another color, say green), and then add a third set of data points (In, under Measures) that would show when an alternate investment method would have us owning the S&P.  Are you able to nudge me in the right direction?

                 

                Thanks for your help.

                • 5. Re: Condensing the x axis
                  James Baker

                  "Date" being green means it's continuous now, rather than discrete (blue).

                   

                  Now what you want is Measure Names/Measure Values.  This is how you graph three measures (Close, RFG In, and In) together on the same pane.  Start by dragging Measure Names on to the Color shelf.  This will make a "Measure Values" shelf pop up - remove the ones you don't want, and I think you're there. :)

                  • 6. Re: Condensing the x axis
                    David Ross

                    James: you're getting me close! I still have two hurdles.  First, as you'll see from the attached Page Screenshot, when the different colors combine on the same line, they blend, rather than remain opaque with only on color "on top".  I tried to go to the axis and click "Move Marks to Top", but that didn't seem to make a difference.

                     

                    The second hurdle stems from the original data, so I've provided a screenshot of that, as well.  You'll notice that there are 5 columns following the Date column.  The Close has a number in every cell because it is the closing prices of the S&P 500 each day.  The In column has numbers only when that method told us to own the S&P.  All the other cells were blank, but Tableau added the word "null".  The same is true for Out, RFG In and RFG Out.  This works fine in Excel, but the inserted Null value causes the line to drop to zero in the chart.

                     

                    Any suggestions on how to solve these two issues?

                     

                    Thank you.

                    David

                    • 7. Re: Condensing the x axis
                      James Baker

                      You can filter out Null values.  Drag a copy of, say, "In" to the Filter shelf, and then select Special -> Non-null values.

                       

                      Secondly, I don't think you need the dual-axes.  You've got "Close" in your Measure Values already, so it doesn't need to be on the Rows shelf again.

                       

                      After you simplify that, check your colors again.  They're supposed to be opaque by default - although you can (from the little dropdown menu next to Color) set them to be semi-transparent.

                      • 8. Re: Condensing the x axis
                        David Ross

                        NOTE: SINCE MY CHALLENGES NO LONGER RELATE TO THE SUBJECT LINE OF THIS POST, I'M STARTING A FRESH POST: "LOOKING FOR HELP STARTING A BAR CHART"

                        James: your reply made so much sense and I was anxious to implement your suggestions, but nothing seemed to work as I expected.  I'm still at such an early stage of learing Tableau that my head starts spinning when I can't make logical sense of what happens when I do an action!  Maybe it would be better at this point to start from scratch on this chart and I'll explain what I understand each step to be.

                         

                        1. Since I am trying to create a Line chart, and not depend on Show Me to pick the chart type, I know I'll need an X and Y axis, with dates on the X, and market values on the Y.  These two qualities are called "Fields".

                         

                        2. I start by dragging the Dates from Dimensions to the "Drop Field Here" box and an single axis appears.

                         

                        3. To get my Y axis field, I drag Close from Measurements to the "Drop Field Here" box and both axes appear.  Tableau has automatically created the values for the Y axis from the range of cell values in Close.  Those cell values have also been plotted on the chart, Tableau having selected Line as the best chart.

                         

                        4.  Since there is so much data squeezed into the chart line, I move the slider on the Marks window all the way to the left and the line gets thinner (SCREENSHOT 1 ATTACHED).

                         

                        5. I now want to see the sets of closing prices that comprise the cell values of In drawn on top of the Closing line, so the Closing prices are in one color, and the sections of the Closing Prices are in a second color.  This is where I run into trouble.  If I drag In from Measures into the Chart, it appears under Color as SUM In and the chart becomes a variable line of shades of green, rather than a separate color. (SCREENSHOT 2)

                         

                        6. The only way I've found of changing the color from variable to separate colors is to drag In over to the right hand side of the chart and create a second Y axis.  (SCREENSHOT 3).

                         

                        7. Since you mentioned that I shouldn't need dual axis, I haven't figured out where to to at this point.

                         

                        8.  Compounding my confusion is that if I follow your Null Values filtering instructions above, and drag In to the Filter shelf, and select Non-null values, I see only the In line (in orange), and none of the purple Close line!  Screenshot 4.

                         

                        Thanks for your patience.  I'm hoping this step-be-step process will help me understand better the mechanisms at work, as well as produce the chart I'm looking for.

                        David