score:0
categories functionality works only for constant tick interval equaled to 1. what you're trying to achieve is having a different space reserved for every category. that means that tick interval has to be irregular.
unfortunately highcharts doesn't provide a property to do that automatically - some coding and restructuring the data is required:
- all the points have specified x position (integer value)
xaxis.grouping
is disabled andxaxis.pointrange
is1
following code is used to define and position the labels:
events: { render: function() { var xaxis = this.xaxis[0]; for (var i = 0; i < xaxis.tickpositions.length; i++) { var tickposition = xaxis.tickpositions[i], tick = xaxis.ticks[tickposition], nexttickposition, nexttick; if (!tick.islast) { nexttickposition = xaxis.tickpositions[i + 1]; nexttick = xaxis.ticks[nexttickposition]; tick.label.attr({ y: (new number(tick.mark.d.split(' ')[2]) + new number(nexttick.mark.d.split(' ')[2])) / 2 + 3 }); } } } } (...) xaxis: { tickpositions: [-0.5, 6.5, 7.5], showlastlabel: false, labels: { formatter: function() { switch (this.pos) { case -0.5: return 'bananas'; case 6.5: return 'apples'; } } } }
live demo: http://jsfiddle.net/blacklabel/2lcs5up5/
Source: stackoverflow.com
Related Query
- Controlling the the spacing between the series to avoid cluttering in Highcharts
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
- Highcharts columns - fixed border width, remove spacing between the bars
- Stop Highcharts from cropping the series line between points on the x-axis
- Highcharts - Show the percentage difference between data points on a series
- Highcharts : How to remove the gap between series and vertical axis?
- Highcharts JS: How do I decrease the spacing between Y values?
- Highcharts increase the space/gap between grouped data series
- how to reduce the spacing between the columns? HIGHCHARTS
- Avoid showing duplicate stack labels on the every column series in a. highcharts
- Highcharts how do i keep space between series the same but increase space between categories?
- HighCharts Hide Series Name from the Legend
- Hiding a Highcharts series without using the legend
- Customizing the colors of individual series in HighCharts
- How can i hide all the Series in highcharts at a time
- Highcharts - How to set custom colors for the series
- Show specific series values in the stack label using highcharts
- highcharts link series such that turn one off turns off the other
- Want to avoid spacing between each stacked bars in highcharts?
- How can I delete all of the points from a highcharts series
- Highcharts - Scatter chart with a line connecting the dots in the series
- How to adjust the spacing of grid lines in highcharts
- Sort the series data for every X-Axis in Highcharts
- How do I style the series labels on a Highcharts pie chart?
- How to remove the halo/glow around a marker upon hovering a series in Highcharts
- Highcharts add tooltip that has a small arrow pointing toward the series
- How do I hide a Highcharts series from the chart, but always show it in the tooltip?
- Gauge Series of Highcharts with React not the Solid Gauge but Gauge Series
- Waterfall Highchart to start some of the columns in between the series with 0 y-axis
- How to fill the Area between two series with multiples yAxis in HighChart?
More Query from same tag
- Divs too wide when hiding/showing
- Issue Converting Highcharts to 24 hours format
- Dynamic tooltip for Dynamic Highchart
- Highcharts prevent page on mobile Safari from moving up and down as I scroll horizontally through data points
- Converting image response, after post request, to file
- Add symbol to custom legend layout - Highcharts React
- How to add different click events on each pie of a pie chart created by highcharts usin jquery
- HighCharts: Keeping Tooltip on Chart Click (Chart, Not Series)
- Dynamic width for each column if value is 0 in highcharts
- Why doesn't highcharts refresh this chart correctly?
- How to attach click event function in Highcharts
- Is it possible to set the tick interval's pixel width?
- how to change the position of HighCharts.js scatterplot marker position
- HighCharts Vue JS - CSV key
- Javascript string as closure function
- Possible to connect the zoom on two Highcharts graphs?
- Is there any way to highlight specific node on click | Highcharts Sankey
- Highcharts, get point index when shared tooltip is shows/hides
- Highcharts not displaying
- Highcharts will not display data
- Exporting HighCharts chart specific height width
- new to highchart and stuck with type datetime , data not plot
- Highchart stacked area series is not showing correctly
- Prevent column text overlapping
- Plot series that cannot be sorted avoiding Highcharts error 15
- Animated series in highchart
- How to make scrollable plot area fill all chart's background area in highcharts?
- Highcharts export with custom HTML graph
- Function not working from particular context in angular
- Highcharts javascript library - marker halo zIndex?