Skip to content

Formating function in shared tooltips returns "options.seriesIndex = 0" #478

@henrikps

Description

@henrikps
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions