score:1
To achieve it you need to position those ticks by using the tickPositions feature and next set wanted value to display by label by using the labels.formatter feature.
Code:
xAxis: {
tickPositions: [0.5, 2, 3.5],
crosshair: true,
labels: {
formatter() {
let value = Math.floor(this.value);
if(!value) {
value = 1
}
return 'group ' + value
}
}
},
Demo: https://jsfiddle.net/BlackLabel/ynj9ka4w/
API: https://api.highcharts.com/highcharts/xAxis.labels.formatter
API: https://api.highcharts.com/highcharts/xAxis.tickPositions
Source: stackoverflow.com
Related Query
- Grouping x axis labels for histogram in high charts
- High Charts : Equal spacing for X Axis for unequal interval
- x axis label word wrap in high charts for radar chart
- ChartJS/High Charts Radar chart - Different radial axis labels for each category that appear on hover
- In highcharts, is it possible get the exact position of x axis labels for overlap detection purpose?
- How to set the x value for High Charts error bar
- HighCharts: display the y-axis labels in percentage instead of the absolute count for basic column charts
- dynamically creating the values for high charts
- Convert the y-axis values to Millions in dual axis high charts
- How to position labels for plotbands on y axis in Highcharts
- How To Show All Data Labels For Datetime Axis In Highcharts
- How can I set the alignment for individual axis labels in highcharts?
- High charts AddAnnotation is not a function for dynamic adding
- Nested table yields unexpected columns for a basic column graph using high charts with 'Data defined in a HTML table'
- HighCharts Bubble Chart: text for axis interval labels
- Multiple images for Highcharts X Axis Labels
- High charts draggable not working for log scale
- High Charts / StockChart: x axis values
- High Charts Column Chart - Y axis Label Formatting
- tickinterval not working high chart for x axis
- High charts not displaying date correctly in x axis per epoch?
- Highcharts: wrong labels align for inverted charts
- highcharts missing x axis labels when stacking two charts
- not able to show x axis data with datetimelabel format with {hh:mm} in high charts
- Set a maximum for data grouping in Highstock charts to prevent from grouping
- Enabling scroll bar on y-axis of the high charts heatmap showing up some additional y-axis labels
- HTML table as data source for highstock charts using highcharts
- Dynamic query for high charts
- High Charts Multiple Line Chart not displaying tooltip for multiple lines
- Heatmap multiple data labels for the same axis in dynamic way using javascript
More Query from same tag
- TypeError: a is undefined Highmaps
- Pie of a Pie chart in HighCharts
- What are my xAxis labels misaligned?
- data label is not shown Highcharts
- highcharts xAxis label set 0.5% step
- hightChart print 'noData' message
- HighCharts - Set default Axis options for my extension
- Generation of svg on server side using highcharts
- Highcharts - Performance issue using chart with x values date and TIME
- Highchart legend has clipped text
- Highcharts export button not showing (included the libraries etc)
- Highcharts/highstock animate series when change the time period button
- Get Id after addpoint in highchart
- Change the color of the navigator
- Highcharts series data
- Highcharts - draw line chart with summed values but show breakup on hover
- Highstock : Shared tooltip except for one series
- Possible to connect the zoom on two Highcharts graphs?
- Highchart GMT and one hour offset
- making series in Highcharts clickable
- Show tooltip programmatically in StockChart for multiples series (highchart)
- Alpha value of 3d chart's rotation ? where is the center?
- Making a graph in php, mysql with highcharts
- having issue when updation Highcharts object using highcharts-ng directive
- Highcharts: How do I add data from a dict to a series
- High Charts Line Chart with missing data
- highchart- how do I hide y-axis, when y-axis is set with max and min limits
- Manually reordering Bar Chart in R Highchart
- Highcharts and PHP
- Highcharts annotations not rendering