Tag Archives: Gantt

Moving the Center Line of a Bar Chart with a Gantt Chart

There are cases where we have bar charts whose centerline is not zero, for example when we’ve indexed a measure to have a base of 100. Here’s an example where the SUM(Sales) for each product Category is indexed to the average sales per Category:

What happens when we want the bars to start at 100 and then go up or down from there, like this?

Read on for how to build this in Tableau! Continue reading

Formatting Bar Charts and Gantt Charts

Much of this will change with Tableau v8.

Andy Cotgreave at the Data Studio w/lots of cool options:
http://www.thedatastudio.co.uk/blog/text-label-beyond-default

Putting text at the left/bottom of bars (by creating another header)
http://public.tableausoftware.com/views/Text-labelledbars/Horizontal
http://public.tableausoftware.com/views/Text-labelledbars/Vertical

Putting text at left/bottom of bars (by creating a dual axis w/ a zero field)
http://public.tableausoftware.com/views/TextLabelsInsideBars/InsideBarHorizontal
http://public.tableausoftware.com/views/TextLabelsInsideBars/OutsideBarVertical
http://public.tableausoftware.com/views/TextLabelsInsideBars/InsideBarVertical

Putting text in center of bars
Option 1 – make it a Gantt Bar (see conditional formatting)
Option 2 – Joe Mako’s hack From http://community.tableausoftware.com/message/184379#184379
See scoreboard for forum jm edit.twbx

Stacked bar charts can put the mark labels in the middle of the bars, so we can use Measure Values with the measure of interest and a measure that returns Null to create the stacked bars. The Null measure won’t show anything, while the measure’s label will be in the proper location.

The measure that returns Null needs a formula like IF 1=0 THEN 0 END, if just Null is used then Tableau forces that to be a True/False dimension, and that won’t work.

Measure Names must be in the level of detail of the view (LoD Shelf, Colors Shelf, etc.) on the Level of Detail Shelf for this to work, that’s part of what forces Tableau to properly stack the bars.

Bar Chart

length of bars is whatever is on columns or rows shelf (stacked or unstacked) Size shelf determines thickness of bars size slider adjusts thickness mark label is pinned to the end of the bar

Gantt Bar chart

starting position of bars is whatever is on columns or rows shelf Size shelf determines length of bars Size slider changes thickness mark labels can be set to beginning, middle, or end of bar Note in Tableau v6.1 the mark label alignment has only one value for all measures with Gantt Bar marks on the same chart. In Tableau v7, the mark label alignment can vary for each measure.

controlling thickness in Gantt bars – some ideas
http://community.tableausoftware.com/thread/112438

one thought is to use a line chart (w/path shelf) to draw lots of lines where the gantt bars would be, and that would enable control of the line thickness as well as length

Couple of options for BYO Gantt Bars

http://community.tableausoftware.com/message/180913#180913
workbooks are (Joe’s uses Custom SQL to duplicate data sources):
Gantt Graph – Margin Walk Viz jtd edit.twbx
Gantt Graph – Margin Walk Viz jm edit.twbx

[loop category=”wikicontent” tag=”bar-charts,Gantt-Charts,Gantt,bars,labels”]
[field title] – Added [field date]
[content]
[/loop]

Related posts:

    [loop tag=”bar-charts,Gantt-Charts,Gantt,bars,labels” exclude=”this” relation=”and” compare=”not” taxonomy=”category” value=”wikicontent”]

  • [field title-link][field thumbnail-link]

[/loop]