score:0
Accepted answer
as mentioned, you should use tooltip.formatter
function (http://api.highcharts.com/highcharts#tooltip.formatter).
in your case that would be
"formatter": function () {
return "i'd like to have first yaxis category here<br>"
+ "<span style=\"font-weight: bold; color:" + this.series.color + "\">"
+ this.series.chart.yaxis[0].categories[this.y] + "</span><br/>"
+ "and second yaxis category here. <br/>"
+ "<span style=\"font-weight: bold; color:" + this.series.color + "\">"
+ this.series.chart.yaxis[1].categories[this.y] + "</span><br/>"
+ "x value: " + this.point.x + "<br/>"
},
score:0
you could use tooltip.formatter (api: http://api.highcharts.com/highcharts#tooltip.formatter) and get y of the point to get corresponding category from category array or from chart directly. example: http://jsfiddle.net/4w89vl75/2/
$(function () {
var cat2 = ['jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
$('#container').highcharts({
tooltip: {
formatter: function () {
return 'first: ' + this.series.chart.yaxis[0].categories[this.y] +
'<br>second: ' + cat2[this.y];
}
},
yaxis: [{
categories: ['jan', 'feb', 'mar', 'apr','may', 'jun']
},{
linkedto: 0,
opposite: true,
categories: cat2
}],
series: [{
data: [5,3,2,4,3]
}, {
yaxis: 1,
data: [2,2,3,4,5]
}]
});
});
Source: stackoverflow.com
Related Query
- Highcharts - how to access category of multiple axis of the point from tooltip
- How to get the highlighted point from shared tooltip formatter, Highcharts
- How to make the Y Axis values not start from 0 in highcharts? How to display forcefully display the last category data on X axis in HighCharts ?
- Highcharts - how to create multiple y axis and group the data series
- how to animate the move of a point from a position to another in a HighCharts scatterplot
- How can I reveal my chart tooltip programatically when the tooltip combines data from multiple series? (sync charts)
- How to call Highcharts tooltip formatter function from outside the config object?
- How can I set the units on multiple axis on Highcharts
- How to plot the X axis data point for uneven tick interval at in Highcharts
- HighCharts - Angular, how to get y axis labels on the vertical lines drawn from x axis
- Highcharts: when having multiple columns for the same X axis value, how can I get 1 tooltip per column?
- How do you change the colour of each category within a highcharts column chart?
- how to set the interval of points on Y - Axis highcharts
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- How to get Highcharts X-Axis Categories starting at the left most point
- How can I remove the white border from HighCharts pie chart?
- Highcharts - How to display legend symbol inside the tooltip
- Javascript Highcharts v3.0.5 - How to hide Y Axis Title when using multiple Y Axis
- Highcharts - How to start x axis from an arbitrary value
- Highcharts how to remove headers from tooltip
- How do I get the value of a highcharts graph point on mouseover?
- Highcharts - How to remove connecting line between fixed tooltip and point
- How can I delete all of the points from a highcharts series
- Highcharts - how to remove "Open in Highcharts Cloud" from the export menu
- How do I remove the color swatch from my HighCharts legend without affecting the column?
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How do I configure the options in Highcharts to allow multiple drilldowns asynchronously?
- How to populate a Highcharts axis with string formatted data from a PHP array
- How do I hide a Highcharts series from the chart, but always show it in the tooltip?
- how to pass values to tooltip which not in x and y axis in highcharts
More Query from same tag
- Highcharts Gantt Vertical Scrollbar Missing in Full Screen Mode
- Update Sankey chart via Socket.IO
- Highcharts Solid Gauge Legend Symbol
- Highlight Highcharts Organization Chart nodes
- Convert Highchart to multiple y axis
- Multi-Line Title is not working when we export to PNG using CanVG - Highcharts
- How can i enable Drag & Drop in Highcharts organization-charts?
- Wrong rendering of y-axis in polar charts
- Highcharts multiple charts drilldown
- Highcharts - Highlight / Shade date range
- highchatrs arabic translation is not working perfectly
- How to retain highchart line graph by onClick() function - php mysql
- Shiny: Add new series to Highcharts plot on button click
- Rails ActiveRecord group_by & sum db results for use with Lazy HighCharts
- HighChart on Android dynamically update
- Highcharts, Yii and body content reloading
- Highcharts: alone point hard not visible with marked disabled
- Highcharts Heat map not displaying data yet correctly labelling
- How to select or highlight the x axis border on click of Y axis label in gantt chart highchart
- HighCharts: Variwide Column Stacked Chart
- Build a highchart chart using data from an external JSON
- Adding tooltip to legend in highcharts
- Highstock chart: navigator displays the wrong area in negative-color
- Color x , y Plotbands highcharts
- How to remove duplicate values in specific column without removing related row
- Highcharts error #13 while instantiating highchart on ajax call
- highcharts tooltip shows scroll bar
- How to affect candlestick color-up/color-down classes
- Display the total count of json key-value pairs in the series in high charts
- JavaScript line and area chart with similar interface as shown