score:1
Accepted answer
This is how you can make x-axis labels unlickable on drilldown. Take a look at this demo: JSFIDDLE
code:
$(function () {
(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);
if (point.drilldown) {
if (tickLabel) {
if (!tickLabel._basicStyle) {
tickLabel._basicStyle = tickLabel.element.getAttribute('style');
}
tickLabel.addClass('highcharts-drilldown-axis-label') .css({
'text-decoration': 'none',
'font-weight': 'normal',
'cursor': 'auto'
}).on('click', function () {
if (point.doDrilldown) {
return false;
}
});//remove this "on" block to make axis labels clickable
}
}
else if (tickLabel && tickLabel._basicStyle)
{
}
return point;
});
})(Highcharts);
// Create the chart
$('#container').highcharts({
.....
.......
Source: stackoverflow.com
Related Query
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- highcharts - chart names for multiple pie chart series in one chart
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Change chart type and redraw with multiple series in Highcharts
- Highcharts multiple column chart with drilldown, correct formatting of drilldown axes
- Highcharts 3.08 drilldown with multiple parent series
- Show/Update Separate Bar graphs with Drilldown Pie chart of Highcharts
- Highcharts display label for pie chart using html table as data source
- Highchart Line chart – data series with multiple axis - 2nd series placed in the middle of X axis
- Highcharts : using same div to load a chart multiple times with different series data
- How to have multiple highcharts with different series data in vuejs without repeating code
- highcharts y axis label with offset is hidden when chart has no title
- Highcharts multiple pie chart series hover
- Dynamic highcharts pie chart with drilldown
- HighCharts Pie Chart - Displaying multiple series values in Tooltip
- Highcharts piechart with slice animation and drilldown on click together throws exception in chart and breaks the pie chart
- Highcharts column + line combination chart with multiple series
- Dealing with pie chart label overlap [Highcharts]
- Highcharts : Chart with drilldown how to obtain click event of drill up button
- Highcharts Pie Chart Drilldown not showing on third drill
- Highcharts chart with 'datetime' xAxis - use categories on drilldown
- Highcharts with JSON data and multiple series
- Highcharts Pie Chart Label Threshold
- HighCharts - Pie chart drilldown for multilevel (3 to 4 level)
- Highcharts - Scatter chart with a line connecting the dots in the series
- Highcharts blank chart with x and y axis
- Need stacked column chart with multiple series
- Highcharts label format with tickPositioner in a datetime x Axis
- Highcharts connecting scatter chart and pie chart with single legend
- Single series drilldown to multiple series Highcharts
More Query from same tag
- Highcharts Data Point Image
- Highcharts - drawing gridlines only up to the series
- How to stop Highcharts from recalculating ticks positions when a series is toggled?
- Highmaps mapbubble
- Highchart inner donut name as header for outer donut tooltip
- R - leaflet - highcharter tooltip
- Show Columns in Highcharts on different X-Axis (side by side)
- Generate multiple charts based on json in angular 8
- Highcharts official + React, series population from JSON?
- Formatting Highcharts labels with a callback function (Formatter)
- Highcharts navigator padding generating new tick
- Cannot connect distinct highcharts points
- HighCharts Rendering Issue In Chrome
- dates cannot be shown on highcharts
- Why is the data showing up incorrectly in the chart?
- How to remove Highcharts grid end lines on x and y axis?
- no data module with multiple series in highcharts.js
- How can I convert datetime stamp in jQuery of a Highchart to get the correct format in json?
- Production build issue with ChartModule in angular 2
- HighCharts: display the y-axis labels in percentage instead of the absolute count for basic column charts
- making series in Highcharts clickable
- Highcharts stack graph stack not visible
- HIghcharts Treemap Groupby leaf objects at Level 1(Parent) and group by child at Level1(Sub objects)with custom color coding
- Isolate a single series on Highcharts line chart
- highcharts opacity when "bubbles" are stacked
- Drawing mysql data with highcharts
- NodeJS highchart save png
- How to plot 500 points in a second in highchart?
- highcharts how to catch and insert logic in click reset zoom button event
- Highchart gantt chart no overlapping