score:1
You can use customEvents plugin to attach events to labels. Then you can update fill for each of columns, see demo for first one: http://jsfiddle.net/6pLkv/5/
When you use axis.series
, then in series array you have onyl series conected to that axis. You don't have to worry about indexes etc.
labels: {
formatter: function() {
return this.value +' mm';
},
style: {
color: '#4572A7'
},
events: {
mouseover: function () {
this.axis.series[0].data[0].graphic.attr({
fill: 'red'
});
},
mouseout: function() {
this.axis.series[0].data[0].graphic.attr({
fill: 'blue'
});
}
}
},
score:1
Having looked at this there seems to be no easy way!
However you can target a particular series like this:
axisCount = 3;
seriesIWant = 1;
$(document).on('mouseover', '.highcharts-axis:eq(' + (axisCount - 1) + '), .highcharts-axis-labels:eq(' + (axisCount - 1) + ') ', function () {
console.log('mouseover');
$('.highcharts-series:nth-child(' + seriesIWant + ') rect').each(
function (i, element) {
$(element).css('fill', '#000');
});
});
$(document).on('mouseout', '.highcharts-axis:eq(' + (axisCount - 1) + '), .highcharts-axis-labels:eq(' + (axisCount - 1) + ')', function () {
$('.highcharts-series:nth-child(' + seriesIWant + ') rect').each(
function (i, element) {
$(element).css('fill', '#4572A7');
});
});
axisCount
is 1-based and here is reflecting the order of the axis you added in the JS (1 = x-axis, 2 = y-axis-1 (temperature) and 3 = y-axis-2 (Rainfall) ).
seriesIWant
is 1-based on the order of the series' being added in the JS, this specifies the "chart" of that series. So hence here 1
is your barchart. It seems to work ok. Demo: http://jsfiddle.net/robschmuecker/6pLkv/4/
Source: stackoverflow.com
Related Query
- Highchart axis hover
- how to hide highchart x - axis data values
- Disable marker hover in only one marker of highchart
- How to display highchart y axis with constistant data
- same scale on x y axis in highchart
- How to dynamically change axis from linear to logarithmic in HighChart
- Overlapping Y Axis in a Multi y axis Highchart
- Highchart axis max with multiple axes
- Highchart Axis Update/ chart redraw
- Get X Axis value on bar Highchart click event
- last label in x axis with datetime format not coming in highchart
- How to place labels on opposite Y axis in Highchart without a second series
- Highchart Crosshair not touching x axis
- max Y Axis value in a Highchart
- Click event on highchart axis
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- Highchart axis 2 decimal places
- highchart Axis values color
- R Highchart // grouped categories in x axis
- X axis value in stackLabels Formatter in bar highchart
- How to add % symbol to Y axis values in HighChart graph?
- Swap Y Axis in Highchart
- Pan one of multiple Y axis for highchart
- Highchart Axis with only min and max series value
- change distance of x-axis labels from axis in highchart
- change distance of x-axis labels from axis in highchart
- Highchart heatmap: exclude the total row for color Axis
- Set series color based on X axis on a column Highchart
- how to add dynamic y axis in highchart from specific point of x-axis
- Divide X axis by Clickable Zones in HIghchart
More Query from same tag
- Convert Highchart to multiple y axis
- Image not exporting correctly in highcharts
- adding new points in a scatter plot
- Create multiple vertical plotlines on click and drag each of the plotline. Developed in Angular 6 and Highcharts
- highcharts how to set y-axis index for series data(categories),not series(legend)
- Tooltip doesn't show properly in highcharts
- How can I click an element in jquery
- How do i add mouse wheel code in Angular2 highcharts in typescript
- Highcharts Range Selector does not work with multiple series
- Can't see the labels on Pie HighCharts
- put a text in all categories in Highcharts
- Why does GeoJSON map looks stretched in Highmaps for WSG84?
- Data from django models not passing to highcharts chart
- Loop inside hchart: Need to get multiple plotlines inside hchart from dates stored in a vector
- how to auto create pdf using highchart graphs
- Highcharts - Format overlapping scatter points in a shared tooltip
- Series as columns in highcharts
- To display dataTable border in Pie chart Highcharts
- HighCharts: Color of label according to the color of pie slice
- Highstock - custom tooltip data not being displayed for larger dataset
- Alter SVG After Highcharts is Redrawn
- Highcharts - Hide subtitle on exporting
- Highcharts - Toggle between different data with dropdown box
- Limit the data points in Highchart
- highcharts change smoothing setting on polar areaspline chart
- Why are Bootstrap tabs displaying tab-pane divs with incorrect widths when using highcharts?
- Highcharts linearGradient fill with fixed upper bound
- Vaadin Charts (Highcharts) - Range Selector - Monthly Data
- Pie of a Pie chart in HighCharts
- Highcharts Y axis needs to be on the X axis