Specifying a custom tooltip that is shared, how do i sho th series shape & color in the point format the way it’s by default?
EDIT
I have just seen the series shape is not show, but how can I at least specify a small filled circle colored with the seris color?
I tried something like that:
tooltip.setPointFormat("<span style=\"color:'{series.color}'\">" + FontAwesome.CIRCLE.getHtml() + "</span> <b>{series.name}</b>: {point.y}<br/>");
But this did not work.
If you want to have the correct shape apart from the correct color you will need some more complex handling, this example for instance will only work if you use MarkerSymbolEnum:
configuration.getTooltip().setPointFormatter(
"function() {"
+ " var symbol;"
+ " switch (this.graphic.symbolName) {"
+ " case 'circle':"
+ " symbol = '●';"
+ " break;"
+ " case 'diamond':"
+ " symbol = '♦';"
+ " break;"
+ " case 'square':"
+ " symbol = '■';"
+ " break;"
+ " case 'triangle':"
+ " symbol = '▲';"
+ " break;"
+ " case 'triangle-down':"
+ " symbol = '▼';"
+ " break;"
+ " }"
+ " return this.x + '<br/>' + '<span style=\"color:' + this.series.color + '\">' + symbol + '</span>' + ' ' + this.series.name + ': ' + this.y;"
+ " }");
This was just a quick test, but it should work