score:2
Accepted answer
You need to add this code to make x-axis label clickable with formatting (underline):
(function (H) {
//For X-axis labels
H.wrap(H.Point.prototype, 'init', function (proceed, series, options, x) {
var point = proceed.call(this, series, options, x),
chart = series.chart,
tick = series.xAxis && series.xAxis.ticks[x],
tickLabel = tick && tick.label;
//console.log("series");
//console.log(series);
console.log("Point = ");
console.log(point);
if (point.drilldown) {
if (tickLabel) {
if (!tickLabel._basicStyle) {
tickLabel._basicStyle = tickLabel.element.getAttribute('style');
}
tickLabel.addClass('highcharts-drilldown-axis-label').css({
'text-decoration': 'underline',
'font-weight': 'normal',
'cursor': 'pointer',
'color':'brown'
}).on('click', function (){
//alert('clicked');
//point.doDrilldown();
point.firePointEvent('click');
});
}
}
else if (tickLabel && tickLabel._basicStyle)
{
}
return point;
});
})(Highcharts);
Source: stackoverflow.com
Related Query
- How to achieve Multiple drill down using the Axis Labels
- Heatmap multiple data labels for the same axis in dynamic way using javascript
- Javascript Highcharts v3.0.5 - How to hide Y Axis Title when using multiple Y Axis
- How do you position the x-axis labels along the line y=0 using Highcharts?
- how to change the point format for drill down in pie charts?
- Highcharts - how to create multiple y axis and group the data series
- How can I set the alignment for individual axis labels in highcharts?
- how to plot multiple time series in the same graph with customized x axis
- How could you supply multiple series to a line chart in R shiny using highcharter package and without hardcoding the series?
- HighCharts Drill Down multiple series , how to get drill down on second item on drill down?
- How do I plot the x axis line using Highcharts when pegged at 0?
- Limiting the Highcharts x Axis while the chart extending During Ajax Drill Down
- I am using click event to trigger a new page to generate the drill down data from highcharts however the entire chart is being generated
- How to make hover effect for two bar in highcharts at the same time is there any way by using css or any inbuilt method to achieve this?
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- Highcharts - how to access category of multiple axis of the point from tooltip
- How to move x-axis labels to the left using highcharts?
- How can I set the units on multiple axis on Highcharts
- Change X axis label on Drill Down using HighCharts
- Highcharts : How do i align data labels above the axis in column chart?
- How can I specify the position of the columns relative to the X-axis labels in a column chart using Highcharts?
- How to allow the country labels to auto-hide when using HTML?
- 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 to get points information when hovering over axis labels in highcharts using custom-events library?
- How to fix formatting of axis labels in Highcharts when surrounding the contents with div?
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- Using multiple hicharts on ASP.NET web form but only one shows on the upper section of the page pushing the page header down
- How to load data dynamically using JSON call in Highcharts Drill Down pie chart?
- How to display the value instead of percentage in a pie chart using jquery Highcharts
More Query from same tag
- HighChart hide other series on click legend
- Hiding _groups_ of series in Highcharts and jQuery: how to get acceptable performance?
- Difference between hiding a div initially and hiding it dynamically
- Highchart Y-Axis Scale Values Missing
- Setting Order of R Highcharter Categories
- Behavior of multiple HighCharts on single page when removing one div
- highcharts filename from canvas
- Highmaps logo string rendering invalid copyright character
- time data with irregular intervals in HighChart
- How to zoom to specific point in Highmaps
- Highcharts - Pie chart with negative values
- Rendering highcharts to custom svg?
- HighCharts. How to display X axis labels line without data?
- Changing the epoch to respective timezone in Highcharts and showing the time on x-axis
- How to add markers to a grouped bar plot in Highcharts?
- print multiple highcharts chart
- Highcharts X-Axis as Text
- How to change line color between points dynamically?
- HighChart - show tooltips for null on hover
- Highcharts 'Cannot read property tooltipOptions of null'
- Convert JQuery Data into HighChart Format
- High chart with diffrent series data
- Adding comma format to Highcharter tooltips
- Highlighting(animate) a piechart slice from an HTML element (mouseover)
- Highmaps - how i can have a seperate legend by different report?
- How to extract data from an interactive chart?
- Highcharts will not display data
- Highchart is blank
- Render bar chart
- Empty space above plot lines in Highcharts