Pierolain
Pierolain

Reputation: 189

Accessing hovered point data series highstock

I have a problem in my Angular app. I have to create a graphic with multiple series and show tooltip with x and y values as well as the point id which is different from x and y.

For gather data, i create an array of point object like this :

 pointobject = {
     x: data.measurementIds[el.x].date,
     y: el.y,
     id: el.x
    }

I push it into my array points, and create a temporary series like object. Once this is done, i push it into serie array and add it to my highcharts config object.

And here is the problem : How can i access in tooltip config part the point id currently hovered ?

Upvotes: 0

Views: 34

Answers (1)

Pierolain
Pierolain

Reputation: 189

I figured out how to get my id : this.points[0].point.id.

I copy/paste Pawel comment for more details:

If you have disabled dataGrouping, then use (for shared tooltip): this.points[0].point.options.id. With enabled dataGrouping you don't have access to id, since a couple of points are grouped into one, and such information isn't available (question is: how to find average of: "a", "v" and "t" letters?).

Upvotes: 1

Related Questions