Display legend for Tableau Chart - tableau-api

In Tableau I created an Area chart. I have managed to display legend for the measure values but cannot legend one for the grey line (additional measure in Rows) as I have built a dual axis chart.
Could some one guide me how this could be done. Apologies if the question is unclear. Can provide more details if need be.

If you're on a worksheet then
Select Analysis > Legends > Color Legend.
Select Worksheet > Show Cards > Reset Cards.
Right-click in the space below the Marks card and select Legends >
Color Legend.
If you have dual axis, ensure transparency is 100% on the first pill else the colors in legend will not show up.
EDIT:
In case you have already done that, try using the All marks card (the top one), put Measure Names on the color shelf

Related

Merging Percentage Lines with The Bars in Tableau Desktop

I have a graph that shows the ratio (count) of payable vs. processed words among the total words on stacked bars. I would also like to display the same ratio in percentages in lines overlapping the bars.
At the moment I have them in two separate graphs, but I want to merge them so that it takes less space in my dashboard view. I am unable to select the dual combination view as it requires two measures and even though I keep trying to cmd+click+drag the percentage measure pill to my marks, it's only changing the calculations in the bars but not allowing me to select the dual combination view.
Since the percentages are basically the ratio of the green/total in the bars, I don't think I need any complicated configurations for displaying it, however, I am also failing to achieve what I want.
Could you please tell me how to do this visualization?
Edit: I noticed that the reason I couldn't generate the dual combination view was that I had three date pills (year, quarter, month), and by removing two of them, I'm able to generate the dual combination view, but it's far from what I'm looking for as it's only splitting the stacked bar into bar+line.
Neeku, I certainly understand the desire to minimize "real estate" in your dashboard. If I understand your needs correctly, I believe that overlaying a transparent-background chart over the first chart might meet your needs, if a dual-axis chart doesn't work for you (for example, if you wanted to overlay a line chart on a column chart that is itself already dual axis).
By way of example, here is a simple Sample Superstore dashboard with a line chart on top and a stacked column at the bottom.
simple dashboard
Change the line chart to "Floating"
Size it to fit over your column chart and change the background to transparent by clicking anywhere in the line chart and select "Format"
...Format Shading
...and "None" for the color selection
Your line chart is now an overlay, but it's pretty messy.
Click on the line chart and hide field labels,
...turn off "Show Header" for each pill in the line chart
Clean things up and it should look better:
Note: one big issue with this approach is that you will not be able to click to select chart elements of the underlying chart.

How to change border thickness on a Polygon in Tableau Desktop?

I have a simple polygon in Tableau Desktop. I know you can easily change the color of the border but there seems no way to change the thickness.
My shape looks like:
Then when you click on 'Color'. You can click on the Border drop down and select the color but not the thickness. Is there another way to do this?
Use a dual axis
Put the field you have on the column shelf on the column shelf twice to get 2 side by side graphs. On the marks card, select the second mark, and change the mark type to line. Adjust color and size to suit.
On the column shelf, right click on the second mark and choose dual axis and synchronize axes (by editing the second axis and checking the synch axes box). If you want to change the order that marks are drawn, you can switch the order of the fields on the column shelf. You might want to hide a header

Display color legend on tableau chart

Is there a way to display color legend on the top left side of a chart .
I have 4 charts in a tableau dashboard and if i display all the legends for all the 4 charts on the bottom it looks busy so I want to include the legends in the charts.
Please help me on this with details steps.
What you want is to make the "legend" a floating object instead of the default tiled object.
To achieve this; You can hold down the Shift key, then drag the legend using the left mouse button while still holding down the Shift key. Drop the legend wherever you wish on the dashboard. Make sure you only release the Shift key after you have dropped the legend at your desired destination.
Warning: Depending on the size of the dashboard you selected, floating objects move around when end users view your dashboard on a device with different screen resolution. To avoid this you can use the "Exactly" size option and define a size range which suits your needs.
To include legends on top left Side of the chart.
Follow steps here as under:
Step1:
Select legends, Right Click on legends top part and select floating and place inside the chart on the top part below heading of Graph as :
So you can follow above steps to add legends in all 4 charts.
Output will look like as
So in this way your legends will not be clumsy and you can describe visualization in a better manner.

Tableau show legends for lines charts on dual axis?

I have 2 lines in a chart and i used dual axis on them. For each line, i manually picked colors for them through the MARKS card.
Now I need a legend to show what each line and their color represent but i dont see any way to do it. When i put one of the pill on the colors box, it gives me a gradient of colors on my trend line which is not the color i manually picked by clicking on the colors box.
How can i go about doing this?
Using the "All" marks card (the top one), put Measure Names on the color shelf

tableau adjust placement of gantt bars

In Tableau, I have a dual-axis bar chart of some data with their margins of error. I am using Gantt bars for the error data, and I want to overlay the error bars on top of the original data. My problem is that I can't figure out how to adjust the placement of the Gantt bars so that they are centered over the top of the original bars, with the error value displayed both above and below the bar.
I am pretty sure I need to create a Calculated Field but am new to Tableau and coding and don't really know how to go about this.
You can do this without the use of Calculated Fields as follows:
Create a Bar Chart with the original data
Duplicate the Bar Chart by Ctrl-Clicking the measure pill in the Rows shelf
You should get 2 charts one above the other now, select one of the charts from the Marks dialog, and change it to Gnatt Bar
Drag error to the Size button of the Gnatt Bar and also to the Color button
Now click the one of the pills in the row shelf and select Dual Axis
Right click the second Axis and select synchronize Axis