为什么要在高图的传说中出现鼠标悬停事件?(why to get mouse out event in legend in highchart?)
https://plnkr.co/edit/JCOQa1vdqU9KBusqlOlL?p=preview嗨我做了一个简单的演示甜甜圈图表。我想在传说中获得mouseover事件和mouseout事件。我能够在甜甜圈切片上获得mouseover事件。它是工作得很好。我想在传说中使用相同的功能。我在传说中获得了mouseover事件,但是我的mouseout事件没有解除为什么?
$(chart.series[1].data).each(function(i, point) { $(point.legendItem.element).hover(function () { // on over for (var i = 0; i < chart.series[1].data.length; i++) { chart.series[1].data[i].update({ color: i === point.index ? point.options.origColor:'grey' }, false, false); } chart.series[1].chart.redraw(); }, function () { // on mouseout alert('--') }); });在鼠标移出时,我想将其移动到原始/相同的状态
https://plnkr.co/edit/JCOQa1vdqU9KBusqlOlL?p=preview Hi I make a simple demo of donut chart .I want to get mouseover event and mouseout event on legends.I am able to get mouseover event on donut slices.It is working fine.I want same functionality on legends.I get mouseover event on legend but my mouseout event not fired why ?
$(chart.series[1].data).each(function(i, point) { $(point.legendItem.element).hover(function () { // on over for (var i = 0; i < chart.series[1].data.length; i++) { chart.series[1].data[i].update({ color: i === point.index ? point.options.origColor:'grey' }, false, false); } chart.series[1].chart.redraw(); }, function () { // on mouseout alert('--') }); });on mouse out I want to move it on original/same state
更多推荐
发布评论