Me again with another obscure issue.
I use a conditional HTML dataLabels to display an image depending on the value of a point.
Sometimes, when I pass from a chart with dataLabels present to a chart without any, I get a javascript exception:
TypeError: Cannot set property 'onmouseover' of undefined
This only happens on these conditions:
No error
Exception thrown
http://jsfiddle.net/gts29eq7/1/
Click the button.
All
I know I can return an empty string instead of null in the dataLabels, but this cause massive slowdown with many points.
I can also disable useHTML, but then I can't display pictures.
As a side note, your github new issue template have a typo in "behavior" (behaviour)
@Dunge Thanks for reporting, we will fix this as soon as possible.
_Internal Note: Fails on Html.js L320 because there is a series.dataLabelGroup
but no div element_
@jon-a-nygaard Any updates on a fix for this? Thanks!
The root cause is that the SVG group has a HTML counterpart, and while the HTML counterpart is deleted, the SVGWrapper's overridden on
function is not. The same thing theoretically happens with translateXSetter
and translateYSetter
. I'll fix this by simply checking for parents[0].div
, but a complete fix would require that we restore the original functions when deleting the div in SvgRenderer.js.
Most helpful comment
@Dunge Thanks for reporting, we will fix this as soon as possible.
_Internal Note: Fails on Html.js L320 because there is a
series.dataLabelGroup
but no div element_