Highcharts - 甘特图阴谋问题 [英] Highcharts - Gantt Chart plot issue
本文介绍了Highcharts - 甘特图阴谋问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想绘制类似甘特图的图表,并使用此解决方案。只要我不开始使用大间隔,它就像魅力一样。
I want to draw gantt-like chart and using this solution. It works like a charm as long as I don't start to use big intervals.
// Define tasks (unixtime * 1000)
var tasks = [{
name: 'Eat',
intervals: [{ // From-To pairs
from: 1360800000000,
to: 1360886400000
}, {
from: 1360368000000,
to: 1360454400000,
}, {
from: 1360195200000,
to: 1360281600000,
}, {
from: 1361059200000,
to: 1361232000000
}]
}];
这里是我的例子,基于上面的代码。如果您将鼠标悬停在间隔之上,您将看不到预期的结果:它会显示来自其他间隔的错误工具提示。
Here is my example, based on code above. If you hover your mouse over the interval you will see not quite what expected: it shows wrong tooltip from other interval.
我的代码有什么问题?可能是我应该定义期间格式或类似的东西?
What's wrong with my code? May be I should define period format or something like that?
预先感谢。
推荐答案
时间序列数据必须按时间顺序排列。我重新命令你的清单是这样的,工具提示是预期的:
Time series data must be in chronological order. I re-ordered your list like this and tooltip is as expected:
var tasks = [{
name: 'Eat',
intervals: [{
from: 1360195200000,
to: 1360281600000,
},{
from: 1360368000000,
to: 1360454400000,
},{
from: 1360800000000,
to: 1360886400000
}, {
from: 1361059200000,
to: 1361232000000
}]
}];
这篇关于Highcharts - 甘特图阴谋问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文