tooltip: {
shared: true,
y: {
formatter: function(value,options){
return options.seriesIndex;
}
}
If tooltip is set to "shared:true" then "options.seriesIndex" is always 0,
but if tooltip is set to "shared:false" then "options.seriesIndex" is set accordingly
so if tooltip is shared you cannot find that value property in "options.series" with "seriesIndex" and "dataPointIndex"
see it in action
https://codepen.io/petr-suchomel/pen/dLGBya