In this question user asks how to use several colors in a heatLegend gradient.
This pen provides a way to do so. However, line 108 of the pen says "this needs to be repeated e.g. on window resize, orientation change, etc."
What would be the correct listener for this to happen? I tried to rebuild the gradient on "sizechanged" with
chart.events.on("sizechanged", function(ev) {
heatLegendTop.markers.each(function(marker, markerIndex) {
... same gradient stuff ...
})
but it still returns the 2-colored gradient on resize.