8 Replies Latest reply on Oct 30, 2013 11:05 AM by Joe Harwood

# Combination Chart with more than 2 panes - area, line & points

Dear Tableau Community,

Can anyone please advise how I can make the following visulisation in Tableau.

I attach a Tableau workbook example of how far I've got and an image of the output here:

and this image is where I'm trying to get to:

In tableau parlance I think I want a 'Combination Chart' with more than two 'Panes'

basically I want:

A single continuous variable x-axis the date
A single continuous variable y-axis the 'price' in \$s

I then want to plot three sets of data on this x-y plot: Let's say the time evolution of the price of oranges, apples & pears.

I know how to put the 'Measure Values' on the 'Rows' shelf and 'Fruit Type' on the 'Colour' to get a differently coloured line for the evolution of the price of each type of fruit - as I've done in the packaged workbook and the first image above.

What I do not know how to achieve is how to have a different 'Mark Type' for each 'Fruit Type'. For example a line for the price of oranges, a scatter plot for the price of apples and an area plot for the price of pears. I know this might seem a ridiculous requirement but that is an artefact of the simplification of the problem. In my real life example this is quite neccessary.

I have seen examples of how to combine, for example a line and scatter plot, by using the 'dual axis' feature and then ensuring the two y-axes line up. However, not only does this solution feel terribly hackish but I can't see how it extends beyond 2d?

Fundamentally this is a simple problem, it is effectively just overlaying different sets of marks. In other systems (R/ggplot2, d3, even Excel) I have not found this to be an issue. Hopefully it is just my being a slow learner and new to Tableau not an intrinsic problem!

Thank you very much for taking the time to read this question, any help you can provide would be greatly appreciated.

Regards,
Joe

• ###### 1. Re: Combination Chart with more than 2 panes - area, line & points

Can anyone help? 24 views, no answers, hope this is not a bad sign!? Apologies there was a delay in adding the workbook - but it's there now.

• ###### 2. Re: Re: Combination Chart with more than 2 panes - area, line & points

Hi Joe,

If you make Oranges and Apples as measures using calculated field then with dual axis technique you can accomplish the output.

Please find the quick sample attached. Missing part is dotted line.(there is a technique to make lines dotted by Jonathan Drummey, I will post it soon.)

Hope I can make a starting point at least.

• ###### 3. Re: Combination Chart with more than 2 panes - area, line & points

Hi Joe,

Find attached your edited workbook with a solution I think reach your requirement

I create three calculation fields, to calculate the price by fruit, then I created a dual axis chart to combines line chart and area chart just for apple.

I hope this help.

Best,

Ramon

1 of 1 people found this helpful
• ###### 4. Re: Re: Combination Chart with more than 2 panes - area, line & points

Excellent.  I believe Ramon's solution is best, as it uses all three fruits.  Is there any particular reason for the different formatting on the lines?  I started to create a solution using a dual axis and a separate sheet with just one measure, floating on top of the dual axis--it allowed all three different formats, but was a bit difficult to get it formatted exactly right.

• ###### 5. Re: Re: Combination Chart with more than 2 panes - area, line & points

Dashed line technique here dashed lines | Drawing with Numbers

1 of 1 people found this helpful
• ###### 6. Re: Combination Chart with more than 2 panes - area, line & points

Just for fun, here is my "floating sheet on dashboard" example.  Both sheets have the same fixed axis, and the second sheet floats on top of sheet1.  Grid lines were removed completely.  I'd still go with Ramon's if possible, as its a simpler and easier to manage format.  I added a color legend on a separate sheet as well, but didn't spend much time on it.

• ###### 7. Re: Combination Chart with more than 2 panes - area, line & points

Thank you very much Ramon for your rapid response. This is the dual axis technique I refer to in my original question I think. Unfortunately, I need 3 types of marks: line + area + points / shapes. It was a bad choice to make the set of points look similar to a dotted line sorry. However, a dotted line is not equivalent to points, with the former every dot does not correpsond to a datum.

I marked your answer as helpful as it will solve many users issues and it is great to know how to make a dashed line!

• ###### 8. Re: Combination Chart with more than 2 panes - area, line & points

Thank you very much for your help. I think this is probably the best way to get three sets of marks on one sheet and it does answer the question. However, it remains more complex than I think it should be and I can imagine I will have difficulties dynamically synching the axis between the different sheets. This is, of course, not your fault!

Thanks again to everyone for their help.