Tip: Adding a label to the Visualization - mstr-dev/Visualization-Plugins-Deprecated GitHub Wiki

When we customize a D3 visualization, we may often run into circumstances when we need to add a label to describe a svg element. This label could be dropzone members or dropzone elements.

While doing this, you should be very carefully. Because when we read information from dataInterface, it is HTML encoded. That means, if you directly use it as text content, you will get "&" instead of "&", not what you expected.

So if you are not very sure if your text contains characters like "& '" and so on, you may want to decode the string first, as following code suggests.

label.text(function (d) {
	return mstrmojo.string.decodeHtmlString(d.value);
})