获取隐藏在C3js上的价值数据 [英] Get Value Data Hidden On C3js
本文介绍了获取隐藏在C3js上的价值数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用来自c3js.org的图表插件,像这样:
I'am using chart plugins from c3js.org like this:
data: {
x : 'x',
columns: [['data1',10,20,30],['data2',40,28,10]]
type: 'bar',
hide: ["hide1","hide2"],
onclick: function(d,i){
console.log(d);
},
labels: true
},
一种从上面隐藏的数据中获取价值的方法?
Is there a way to get value from data hidden above?
在此之前,谢谢,抱歉我的英语不好。
Thanks before, and sorry for bad my english.
推荐答案
您是要隐藏数据还是从click事件中获取hide数组的值?如果是后者,则可以在onclick事件中使用:
Are you trying to hide the data, or get the value of the hide array from the click event? If the latter, in the onclick event, you can use:
this.data.shown()
获取显示的数据对象的数组。
to get the array of shown data objects.
这篇关于获取隐藏在C3js上的价值数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文