我想找出一种方法来突出显示散点图中的某些点。我花了一些时间研究它,但没有找到简单的方法。如果我绘制的数据看起来像这样:
- numberOne: 50, numberTwo:45, highlight:0
- numberOne: 65, numberTwo:30, highlight:0
- numberOne: 35, numberTwo:50, highlight:1
- numberOne: 25, numberTwo:45, highlight:1
- numberOne: 60, numberTwo:75, highlight:0
所以代表上面第三行和第四行的点将显示为不同的形状、颜色或大小。有没有人对此有任何见解?
谢谢!
最佳答案
想出了如何使用系列中的渲染器来完成它,这是我的代码:
renderer:function(sprite, record, attr, index){
console.log(record.get('highlight'));
console.log(sprite);
var highlight = record.get('highlight');
var color = null;
if (highlight == 1) {
color = "#1BE01B";
}else{
color = "#E81717";
}
return Ext.apply(attr, { fill: color });
}
关于javascript - ExtJS散点图,根据数据中的标志高亮显示某些点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14631336/