解决方案 »
- (问题解决了,谁接个分结贴了)Jquery 二级导航 focusout ie和其他浏览器不同的 问题
- 如何实现像Csdn当鼠标移到用户名时显示一个方框(包括头像和个人帐户信息)?
- 用js能作出 如何实现45度的游戏地图
- 求助一段js代码
- 怎样让网页自动提交
- 非法字符表达式 还是不正确。
- 怎么在当前页打开另外一个窗口,打开方式要求target="_parent"
- 请问JavaScript可以对本地的数据库进行操作么?比如:查询,插入,修改等
- 怎么做类似csdn这种标签输入效果
- vue制作连线题
- document.execCommand('saveAs','')在IE6为何弹不出另存为窗口
- 请问如何用jquery获取页面中的自定义标签
This is optionally exposed by visualizations that want to let you access the currently selected data in the graphic.selection_array getSelection()Returnsselection_array An array of selected objects, each one describing a data element in the underlying table used to create the visualization (a DataView or a DataTable). Each object has properties row and/or column, with the index of the row and/or column of the selected item in the underlying DataTable. If the row property is null, then the selection is a column; if the column property is null, then the selection is a row; if both are non-null, then it is a specific data item. You can call the DataTable.getValue() method to get the value of the selected item. The retrieved array can be passed into setSelection().Examplefunction myClickHandler(){
var selection = myVis.getSelection();
for (var i = 0; i < selection.length; i++) {
var item = selection[i];
if (item.row != null && item.column != null) {
message += '{row:' + item.row + ',column:' + item.column + '}';
} else if (item.row != null) {
message += '{row:' + item.row + '}';
} else if (item.column != null) {
message += '{column:' + item.column + '}';
}
}
if (message == '') {
message = 'nothing';
}
alert('You selected ' + message);
}
官方给的 看不懂 求翻译