score:1
Accepted answer
For example in the load
event you can remove specific labels
and gridLines
:
chart: {
events: {
load: function() {
var chart = this,
yAxis = chart.yAxis[0],
gridLines = yAxis.gridGroup.element.children,
ticks = yAxis.ticks,
tickPositions = yAxis.tickPositions;
gridLines[2].remove();
ticks[tickPositions[2]].label.element.remove();
}
}
}
Live demo: http://jsfiddle.net/BlackLabel/5m0s7th2/
API Reference: https://api.highcharts.com/highcharts/chart.events.load
score:0
Using the accepted answer I did this in a loop to avoid losing my middle gridline and tick val.
events: {
load: function() {
var chart = this,
yAxis = chart.yAxis[0],
gridLines = yAxis.gridGroup.element.children,
ticks = yAxis.ticks,
tickPositions = yAxis.tickPositions;
var i = 4;
while(i > -1){
if(i !== 2){
gridLines[i].remove(); // the whole array element is removed from gridLines, so we're doing this backwards
ticks[tickPositions[i]].label.element.remove();
}
i--;
}
}
}
It became a problem when I was starting from 0 using either the accepted answer or my loop. Hope this helps anyone who may have a ton of gridlines.
Source: stackoverflow.com
Related Query
- Can you remove specific grid lines and point labels using highcharts without css?
- How to remove Highcharts grid end lines on x and y axis?
- Highcharts - How to remove connecting line between fixed tooltip and point
- Highcharts - How can I remove starting and ending padding from area chart
- How do you show grid lines for both x axis and y axis in highchart?
- How to remove the value and number labels from Highcharts angular gauge
- Remove first and last grid lines in highcharts?
- Getting the tick position and labels for Solid Guage using highcharts
- How can I make milestone lines with a GANTT chart using the highcharts library?
- Formatting data points and Y-axis labels using HighCharts
- How could you supply multiple series to a line chart in R shiny using highcharter package and without hardcoding the series?
- Highcharts using Django-Chartit. Chart lines not displayed without window resize, or Inspect Element
- How can I prepare a Group Stacked Bar Chart in Highcharts using multiple and different types of data?
- How to hide specific dots and labels onmouseover in highcharts
- hover on a point in highcharts graph using playwright and typescript
- How can I highlight USA using Highcharts without highlighting Alaska?
- How can you align the left and right Y-axes of vertically stacked HighCharts charts?
- How to highlight a point without using any event or action in highcharts
- how can I use rangeselector and navigation in highcharts in the given code
- How can I show last 10 indexes in Highcharts Timeline and left using scroll?
- In Highcharts Make tooltip of a specific point always visible and dynamically i will change its point
- How to create a column range chart in Highcharts using range and navigator functions?
- Hiding a Highcharts series without using the legend
- Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
- Highcharts remove zero value labels
- How do I dynamically change a data point in Highcharts using JavaScript
- Highcharts Pie Chart.How to set labels in two lines
- Highcharts - labels inside and outside a pie chart
- How can I remove the white border from HighCharts pie chart?
- How do you increase the performance of highcharts chart creation and rendering
More Query from same tag
- Show HighCharts tooltip when chart loads
- Rails 4: chart is not showing
- Would it be possible to make two columns which belong to different series respectively to be placed exactly on the tick on x-axis with highchart?
- modify Xaxis in highcharts
- How to store highcharts compatible json array data in mongodb
- Highcharts stacked bar data from CSV
- Is data grouping supported in Highcharts?
- Highchart Column with Drilldown using MySQL
- How do I change the opacity of a series in Highcharts?
- javascript Highcharts object as a C# class
- How to use scrollbar on highcharts heatmap?
- Highcharts: How can I achiveve multiple rows on chart labels?
- Change the step size of Highcharts Drag?
- Highcharts - How to combine unique legend for multi-series pie chart which perform same action for both series? (like onclick: show/hide)
- Set series color based on X axis on a column Highchart
- HighChart: Add xaxis dynamically doesn't consider what type I give it
- How to use HighStock's tickPositioner to set tick at end of month?
- Outline or border for the spline series in highcharts
- How to exchange data between a form, a php file and a javascript file
- combining an area chart with a line chart in highcharts.js
- highcharts tooltip not working after zoom
- Highcharts show max., min., and average for each serie in legend
- HighMaps: Change state name on tooltip with various sets of data
- Change the color of the bar chart based on the value
- Highchart js zoom remove labels of series from legend
- How to tell the Highcharts renderer to make the viewport bigger?
- Highcharts - Get and plot data with MySQLi + JSON (step by step)
- Internationalization in highcharts?
- Highmaps: How do you change the name of a state
- How do you call a programmer-defined function in javascript in an android webview?