score:5
Accepted answer
if you want to attach additional data to points in a series you can initialize the points that need additional data as objects instead of arrays/ints. for example, with your code you could do:
series: [{
name: 'song plays',
data: [
{x:'song_name1', y:123, songid:'song_id_1'},
{x:'song_name2', y:234, songid:'song_id_2'}
]
}]
you can then get it from the point on click as event.point.songid
. see this jsfiddle demo using point click and tooltip.
note that in many cases x
in the object will not be required. it is often automatic and sequential.
score:2
you can try
alert(event.point.series.useroptions.data[event.point.x][2])
updated fiddle: http://jsfiddle.net/y4a2end3/2/
or this:
alert(event.point.series.useroptions.data[event.point.series.data.indexof(event.point)][2]);
Source: stackoverflow.com
Related Query
- How to pass custom data into Highcharts graph click event
- Angular 8 highcharts How to pass custom data to drilldown event in Highcharts
- Yii2 How to pass php array data into highcharts
- Highcharts how to pass data from server into chart
- How to load custom JSON data into Highcharts mapbubble?
- Highcharts : Chart with drilldown how to obtain click event of drill up button
- How to pass json data to highcharts series?
- highcharts how to catch and insert logic in click reset zoom button event
- How to get multiple data series into Highcharts
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- HighCharts: How to Determine on Click Event what Data Grouping the Chart is Currently In?
- How to attach click event function in Highcharts
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- How to add series after click event in HighCharts
- Click event and two way data binding in HighCharts using AngularJS
- How to input plot data into highcharts with rails
- How to align Highcharts datetime x-axis with data I pass to it?
- Dynamically set click event on bar from highcharts graph
- HighCharts & MVC: How to load whole graph definition and data with JSON?
- How can I pass values from Highcharts event callbacks (click, mouseOver, mouseOut) back to React component member function?
- Highcharts custom events plugin right click event not firing
- How do I attach a click event handler to the whole HighCharts Gauge control?
- How can I make React Native in Android aware of a click event in a tooltip in a Highcharts chart?
- Highcharts access drilldown data from event click
- Pass data to click event callback in Highstock chart with more then 1000 entries
- Highcharts - How can I get the nearest point on click event
- How can I use data.table or data.csv and extra data for click event handling
- how to continue the graph line when missing series of data in middle of highcharts
- Angular 11 - How to import array data into highcharts
- highcharts group series click event to get all data in catagory
More Query from same tag
- How do I make a Highcharts timeline where the labels don't overlap and none are hidden?
- timestamp values showing wrong on xaxis in highcharts its show default 1970-01-18
- Modify dataGrouping in Highcharts
- Highcharts - How do I get dashed lines in legend
- Hicharts data API for line graph using datatime and matching x-axis to y-axis
- Title of highchart rendering bad
- sort/arrange on date in dashboard
- Highcharts: How to set dataGrouping
- High Chart set x axis value in hours format
- How to pass JSON data to update Highcharts Pie chart
- Cannot pass parameter (in array) when loading javascript
- Creating dynamic Highcharts based on an array
- Retain Marker color on Line History Series in Highchart
- Dynamically creating mutiple Highcharts charts in Angular directive
- Highcharts: Error bars in drill-down charts
- Add or declare two plotOptions in highcharts for Synchronized chart
- onclick on spiderweb chart open new one for details
- Highcharts column drilldown colors exhausted after 9 columns?
- Highcharts - Passing in Color with JSON
- Highcharts Error #15 with wrong data series displayed
- Highcharts - Selection Event Modify Options
- Highcharts with inverted y-axis, but not inverted data?
- Highlight tooltip shared item depending on hovered serie in Highcharts
- How to show real time HighCharts Line Graph data which is receiving by an API?
- Highcharts don't connect points between years
- Unable to pass datas for HighCharts Maps javascript
- Highcharts center on x and y axis offset
- How can I have same hover point color in highcharts?
- How to speed up the package loading in R (in Shiny app)
- Highcharts - parse json series