开发者

Remove Image/Symbol from Highchart Graph

I am dynamically adding images to the graph, something like below:

marker[group] = chart.renderer.g('icons').attr({zIndex: this_开发者_高级运维z}).add();

symbol[group] = chart.renderer.image(marker_url, -50, 0, 20, 37).add(marker[group]);

How do I remove a image/symbol from the graph? Something like .remove?


Well, it is possible. Any renderer function like arc or g returns element. Every element contains element field of Element type. With jQuery you can do everything with this element, for example:

marker[group] = chart.renderer.g('icons').attr({zIndex: this_z});
marker[group].add();
$(marker[group].element).remove();

This will do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜