Open qitianhuoshen opened 3 years ago
期望:点击3d散点图的某个点,高亮显示。
思路:监听点的点击事件,使用 dispatchAction type: 'highlight 让这个点高亮显示
问题:使用这个方法,的确会使点高亮,但是因为有自带的事件,导致无法保持这个点高亮显示。
具体描述: 我是点击的时候,想要把我这个节点高亮的,但是只要我把鼠标移开,这个高亮的效果就没有了。
我设置了定时器 300ms后再点亮这个点,果然点上了。但是我再次把鼠标移到这个点再移开之后又没有高亮效果了。
具体代码如下: ` myChart.on('mousedown', function (e) { console.log('mousedown:', e); if (e.event.event.button === 2) { console.log("右键事件"); }else if(e.event.event.button === 0) { //单击事件 if (e.componentSubType === 'scatter3D') { //todo... console.log(e.value); //z轴,y轴,x轴, var index = e.dataIndex; setTimeout( function(){ myChart.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: index}); } , 300 )
} } });`
希望: 如何像散点图那样,点击的时候已经保持高亮的,鼠标再经过离开也不会失去高亮的效果。 3D散点图,无法保持这样,不是3D的散点图就可以有这样的效果。
scatter3D highlighting would be nice indeed. But even more important are actions select and unselect, and event selectchanged. Then we'll have truly interactive 3D charts !
期望:点击3d散点图的某个点,高亮显示。
思路:监听点的点击事件,使用 dispatchAction type: 'highlight 让这个点高亮显示
问题:使用这个方法,的确会使点高亮,但是因为有自带的事件,导致无法保持这个点高亮显示。
具体描述: 我是点击的时候,想要把我这个节点高亮的,但是只要我把鼠标移开,这个高亮的效果就没有了。
我设置了定时器 300ms后再点亮这个点,果然点上了。但是我再次把鼠标移到这个点再移开之后又没有高亮效果了。
具体代码如下: ` myChart.on('mousedown', function (e) { console.log('mousedown:', e); if (e.event.event.button === 2) { console.log("右键事件"); }else if(e.event.event.button === 0) { //单击事件 if (e.componentSubType === 'scatter3D') { //todo... console.log(e.value); //z轴,y轴,x轴, var index = e.dataIndex; setTimeout( function(){ myChart.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: index}); } , 300 )
希望: 如何像散点图那样,点击的时候已经保持高亮的,鼠标再经过离开也不会失去高亮的效果。 3D散点图,无法保持这样,不是3D的散点图就可以有这样的效果。