score:0
try this,
i added tooltipclick
class to the span
{
usehtml: true,
formatter: function () {
var s = '<b>' + this.x + '</b>';
$.each(this.points, function (i, point) {
s += '<br/><span style="color:' + point.series.color + '">\u25cf</span>\n\ <span class="tooltipclick">click me</span> ' + point.series.name + ': ' + point.y;
});
return s;
},
shared: true
}
and delegated an event handler
$(document).on('click','.tooltipclick',function(){
console.log($(this).parent()); //get the tooltip
alert('a toolip was clicked')
});
score:2
i got the answer on my query from highcharts
tooltip: {
usehtml: true,
formatter: function () {
var s = '<b>' + this.x + '</b>';
$.each(this.points, function (i, point) {
s += '<br/><span style="color:' + point.series.color + '">\u25cf</span>\n\ <span onclick="my_function();">click me</span> ' + point.series.name + ': ' + point.y;
});
return s;
},
shared: true
}
i am doing a spelling mistake by using usehtml but it is actually usehtml. so now my problem is solved.
Source: stackoverflow.com
Related Query
- how to add onclick event handler inside highcharts tooltip
- How do I add an event listener to a Highcharts object *AFTER* I've created it
- Highcharts - How to display legend symbol inside the tooltip
- how to get chart object inside a point event function in Highcharts
- Add onclick event on chart made with the highcharts library
- How to hide Axes Crosshairs by onclick event in Highcharts
- How to add series after click event in HighCharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- How to edit tooltip in Highcharts C# code
- How do I attach a click event handler to the whole HighCharts Gauge control?
- how to use highcharts tooltip formatter in python code
- How can I make React Native in Android aware of a click event in a tooltip in a Highcharts chart?
- How to add a second tooltip to highcharts
- Highcharts add an image to that chart with an onClick event attached to it
- How to get the angular component class reference inside an emitted Highcharts selection event callback function?
- HighCharts : How to add click event on colorAxis in heatmap
- How do I catch a click event on a polygon in HighCharts without having the tooltip popping up
- How to add separate annotation style tooltip for Highcharts marker?
- How to add clickable HTML-link into tooltip in Highcharts 5.0.x?
- Highcharts how to add treemap upon click event on line chart?
- How to add icon/svg/image on X-axis for bar graph onclick event using highcharts?
- How can I add links in a Highcharts tooltip that will open on mobile's browser?
- How to convert tooltip to onclick event in high charts?
- How to add Tooltip Functionality to X-axis labels in highcharts
- How can i add dynamic data inside flag series in highcharts
- how to add copyright symbol in a highcharts title?
- Add tooltip to legend in highcharts when hovering
- Highcharts: How to add HTML inside of chart area
- Highcharts how to remove headers from tooltip
- Highcharts - How to hide series name and Y value in tooltip
More Query from same tag
- HighCharts title styles i.e textDecoration property not applying when we export the chart using canvg
- Highcharts Gauge chart is rounding down max number
- Make datepicker work with highcharts
- How to change color of lable (name) in a highcharts series?
- How to change highcharts graph axis colors on export?
- how to add border radius on plotbackground area in highcharts
- Changing the cursor in highcharts
- Highcharts: Set a individual text color by series name
- plotBands Highcharts, if i increase pointInterval the data is display with mismatching
- Text Ellipsis in bubble chart
- How to display Highcharts x-axis time stamp labels inside tooltip?
- Highcharts area graph with fillColor changing color depending on the zone color?
- Updating fontsize with highcharts using zoomtype
- React Component, Highstock: Synchronize multiple charts?
- Highstock X-Axis: Categories in Place of Time
- Legend title position in
- How to add a line break in Highchart legend in R?
- pointPlacement in Highcharts Heatmap with datetime xAxis
- color doesn't match in scatter plot
- Drilldown displayed in coloum instead of pie chart
- HighCharts xAxis show on 0 line with tick marks between all columns
- Customize tooltip in Highcharts.js?
- Display multiple time series with rCharts hPlot
- Highcharts - Alignment issue on 3rd Y axis
- Repeated values in x axis in dotnet highchart controls
- How to de-couple and do dependency injection with highcharts-ng
- how to dynamically change column chart to mirror chart using highchart
- Is there a way to disable specific export options in HighChart 5.0.14?
- Is it possible to use null datapoints with a datetime x-axis?
- Highcharts's pie chart minSize option not working