https://jsfiddle.net/wx1spb4k/
I tried this.text = "Hide Label" but it does not work.
Also, is there anyway to add font awesome icon with the text "Show Label"?
Code: Select all
label: {
onclick: function () {
this.text = "Hide Label";
this.renderer.label(
'You just clicked a custom menu item',
100,
100
)
.attr({
fill: '#a4edba',
r: 5,
padding: 10,
zIndex: 10
})
.css({
fontSize: '1.5em'
})
.add();
},