In a Highcharts sankey diagram, I would like to label the nodes with a tooltip. The left (sender nodes) should be labeled differently than the right ones (receiver nodes).
Example:
Left node: "CVP (Origin Party Votes): 6000"
Right node: "CVP (Receiver Party Votes): 5000"
I tried it with a nodeFormatter formatting function, but failed. The jsfiddle is here: https://jsfiddle.net/martindfurrer/ah175o8e/
tooltip: {
nodeFormatter:
function() {
if (this.point.fromNode.name != null) {
return (point.name +'(Origin Party Votes): '+point.sum);
}
else if (this.point.toNode.name != null) {
return (point.name +'(Receiver Party Votes): '+point.sum);
};
}
}