jhanifen
jhanifen

Reputation: 4591

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?

Upvotes: 3

Views: 3132

Answers (1)

Igor Dymov
Igor Dymov

Reputation: 16460

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.

Upvotes: 3

Related Questions