本文介绍了单击amcharts的甘特条形图时无法获取参数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的甘特条形图.实际上,我需要获取的是我要传递的值,例如taskname或任何其他附加值.当我单击任何条形图时,单击事件都可以正常工作,但是单击该条形图时,无法获得任务名称等系列的值.我的数据格式:
This is my gantt bar chart. Actually what I need to get is the value which I am passing like taskname or any other extra value. When I click on any bar the click event is working fine but I am not getting the value of series like task name on click of that bar.My data format:
{
"start": "2016-01-01",
"end": "2016-01-14",
"color": "#b9783f",
"task": "Gathering requirements" //that name i need to find when i click on any bar
}
并且我的点击功能的运行方式类似于:
and my click function is working like :
"listeners": [{
"event": "clickGraphItem",
"method": function (event) {
debugger;
alert(event.item.category);
}
}]
如果有人对弹床有任何想法,可以请帮帮我.小提琴链接是:
If someone has any idea about amcharts can you please help me out. The fiddle link is : http://jsfiddle.net/cuo9d2pz/
推荐答案
我设法使用:
event.item.graph.customData.task
这篇关于单击amcharts的甘特条形图时无法获取参数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!