Extjs 4:时间堆积条形图,可能吗? [英] Extjs 4: Time Stacked Bar Chart, possible?

查看:167
本文介绍了Extjs 4:时间堆积条形图,可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图完成一个时间堆叠条形图,输入数据如下所示:

  {name :Folienwechsel,
starttime:02/29/2012 09:50:07,
endtime:02/29/2012 09:50:46,
duration:38546.0},
{name:Pause,
starttime:02/29/2012 09:50:46,
endtime :02/29/2012 09:51:36,
duration:49943.0},
{name:Wartezeiten,
starttime:02/29 / 2012 09:51:36,
endtime:02/29/2012 10:04:43,
duration:787086.0}

当您看到开始时间和结束时间继续时,当状态完成另一个开始时,我一直在尝试使用timeaxis在本教程中


Hi I'm trying to accomplish a time stacked bar chart where the input data looks like this:

{"name":"Folienwechsel",
 "starttime":"02/29/2012 09:50:07",
 "endtime":"02/29/2012 09:50:46",
 "duration":38546.0},
{"name":"Pause",
 "starttime":"02/29/2012 09:50:46",
 "endtime":"02/29/2012 09:51:36",
 "duration":49943.0},
{"name":"Wartezeiten",
 "starttime":"02/29/2012 09:51:36",
 "endtime":"02/29/2012 10:04:43",
 "duration":787086.0}

As you see the start time and end time are continued, when a state finish the other one starts, I've been trying with the timeaxis, based on this tutorial http://aboutfrontend.com/extjs/extjs...-and-timeaxis/, and also with the stackbar example in sencha http://docs.sencha.com/ext-js/4-0/#!...tackedBar.html. An image example of what I'm trying to do:

I already done this with HighChart, but my company has bought ExtJs then I need to do this with Extjs, then it would be great if someone can tell me if its possible, and if it is, then if could guide me with an example or how should I start...

Thanks.

解决方案

I spent some time working with time based charts in ExtJs4 and I have to warn you - that TimeAxis is buggy. I even had to replace my time axes with simple numeric ones. The idea is simple - convert your dates into the timestamps and pass them to your numeric axis.

Stackbar chart is a good choice for you. See this example (modified a bit), from official sencha examples:

http://jsfiddle.net/UDwz7/

这篇关于Extjs 4:时间堆积条形图,可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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