随着时间的推移甘特图与总和条 [英] Gantt over time with summed bar

查看:39
本文介绍了随着时间的推移甘特图与总和条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Tableau 中创建以下图表时遇到问题.

我有这样的数据:

姓名日期计数2012 年 11 月 10 日 212/10/2012 32012 年 10 月 13 日 2b 12/10/2012 6b 13/10/2012 2b 2012 年 10 月 14 日 3c 14/10/2012 2c 15/10/2012 2

我想创建一个条形图,它在 y 轴上有计数和在 x 轴上有时间的总和.条形的宽度应该是时间的长度,就像甘特图一样.每个名称都有自己的栏.这是一张显示我所追求的图像.

如果时间重叠,条形应该重叠.

我在 Tableau 中尝试了各种方法,但还没有真正接近.

Tableau 中可以使用这种图表吗?如果不是在 7 中,会在 8 中吗?我听说它可以创建一些更复杂的图表类型.

可以在 http://community.tableausoftware.com/servlet/JiveServlet/download/188799-12362/Gantt%20over%20time%20with%20summed%20bar.twbx.zip>

感谢您的帮助,安德鲁

解决方案

Tableau 中甘特图的技巧是在大小架子上进行计算,以天为单位计算每个条形的持续时间.请参阅 Tableau 示例

中的示例屏幕截图

您还需要在列架上有一个连续的日期字段才能获得水平时间轴.

在这个例子中,我还做了一些更多可选的事情,例如,在分析菜单下关闭聚合以获得每个数据行的标记,而不是聚合它们,在行架子上添加一个离散日期以使每个bar 位于不同的行上(只要每个条形在不同的日期开始)并隐藏该开始日期的列.

I'm having trouble creating the following chart in Tableau.

I have data that looks like this:

name    date    count
a   11/10/2012  2
a   12/10/2012  3
a   13/10/2012  2
b   12/10/2012  6
b   13/10/2012  2
b   14/10/2012  3
c   14/10/2012  2
c   15/10/2012  2

And I want to create a bar chart that has the sum of the count on the y axis and time on the x axis. The width of the bar should be the length of the time, like a Gantt chart. Each name has its own bar. Here is an image that shows what I am after.

The bars should overlap if the times overlap.

I have tried various things in Tableau but haven't really got close.

Is this kind of chart possible in Tableau? If not in 7, will it be in 8? I have heard it makes it possible to create some more complex chart types.

A workbook with data can be found at http://community.tableausoftware.com/servlet/JiveServlet/download/188799-12362/Gantt%20over%20time%20with%20summed%20bar.twbx.zip

Thanks for your help, Andrew

解决方案

The trick with Gantt charts in Tableau is to put a calculation on the size shelf that calculates the duration of each bar in units of days. See the example screenshot at Tableau example

You also need a continuous date field on the columns shelf to get a horizontal time axis.

In this example, I also did a few more optional things, such as, turned off aggegation under the analysis menu to get a mark per data row, rather than aggegating them, added a discrete date to the rows shelf to make each bar go on a different line (as long as each bar starts on a different date) and hid the column for that start date.

这篇关于随着时间的推移甘特图与总和条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆