You can usually customize the tooltip format based on the series name in highchart using the following code type:
tooltip: { formatter: function() { return ''+ this.x +': '+ this.y + (this.series.name == 'Recovered' ? '%' : ''); } }
Above is said in the last line, if this is the name of the series โRestoredโ, then add โ%โ, otherwise do not add anything.
However, I want my two series to have% not only one, so I want to add an OR operator, something like
tooltip: { formatter: function() { return ''+ this.x +': '+ this.y + (this.series.name == 'Recovered'||'Targeted' ? '%' : ''); } }
So that both of these series add%. But this method does not work for me. Any ideas? Thank you very much.
source share