Highcharts Pie chart return slice animation on mouseout -
i implementing animated pie chart in highcharts slices pull out on mouseover , apart issue on mouseout want slice return 'closed' position.
this code animation , have cleartimeout on mouseout not returning slice original position.
is there easy way of chart original position.
i have fiddle here...
http://jsfiddle.net/rupertito/y3wvn/1/
pie: { allowpointselect: true, stickytracking: false, point: { events: { legenditemclick: function() { return false; }, mouseover: function(event) { var point = this; if (!point.selected) { timeout = settimeout(function () { point.firepointevent('click'); sectors.tooltip.refresh(point); }, 20); } } } }, events: { mouseout: function() { cleartimeout(timeout); }, },
hope makes sense , in advance.
cheers rob
this bug reported here. it's not working slice point. there workaround how avoid issue. , simple example mouseover/mouseout: http://jsfiddle.net/gqfu4/8/
function settranslation(p, slice){ p.sliced = slice; if(p.sliced){ p.graphic.animate(p.slicedtranslation); } else { p.graphic.animate({ translatex: 0, translatey: 0 }); } }
and pie:
point: { events: { mouseout: function () { settranslation(this, false); }, mouseover: function() { settranslation(this, true); } } },
Comments
Post a Comment