Tag Archives: Gantt Charts

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:

Putting text at the left/bottom of bars (by creating another header)

Putting text at left/bottom of bars (by creating a dual axis w/ a zero field)

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

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

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]

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]