score:0
Accepted answer
You don't have to categorize yAxis - you can display proper yAxis labels using yAxis.labels.formatter function:
var yAxisCategories = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth']
yAxis: {
labels: {
formatter() {
return yAxisCategories[this.pos]
}
}
},
If you'd like to stick with categorized yAxis, you can manually move xAxis closer to they yAxis 0 value using xAxis.offset property together with yAxis.tickmarkPlacement 'on' property. In this example, I have put -34px rigidly, but you can calculate the proper value in chart.load event and then update calculated offset.
xAxis: {
type: 'category',
offset: -34
},
yAxis: {
type: 'category',
categories: ["First", "Second", "Third", "fourth", "fifth"],
tickmarkPlacement: 'on'
},
If you want to try a different approach, let me know - I will edit my answer.
API References:
https://api.highcharts.com/highcharts/yAxis.labels.formatter
https://api.highcharts.com/highcharts/yAxis.tickmarkPlacement
https://api.highcharts.com/highcharts/xAxis.offset
Source: stackoverflow.com
Related Query
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- 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?
- How to get Highcharts X-Axis Categories starting at the left most point
- Dual axis using percentage and absolute value to same serie in Highcharts
- drilldown maps and funnell charts on the same page using highcharts
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Highcharts - how to create multiple y axis and group the data series
- how to display 2 same highcharts without duplicate the code
- How to make two charts using highchart show up in the same line side by side using div
- how to show column and area charts with different y axis with same category and same x axis in highcharts
- How can I make milestone lines with a GANTT chart using the highcharts library?
- How to make the Y Axis values not start from 0 in highcharts? How to display forcefully display the last category data on X axis in HighCharts ?
- Scatter chart using HTML and Java Script (makeing y axis starting from zero (upside down) )
- How do I plot the x axis line using Highcharts when pegged at 0?
- Highcharts - three series using left Y axis and the fourth using the right Y axis
- How to make a HighCharts drilldown column/bar chart that does not hide the non-drilldown categories
- HIGHCHARTS How to to make separate colors for shaded region and the line in Area Graph
- Align second scatter series to the side similar to how column and bar charts do using HighCharts
- How to make a rendered label in Highcharts always visible and still relative to the point clicked or hovered over
- How to make the selection of individual series dynamic in highcharts even after setting max and min?
- How do I implement grouped categories plugin using text and images as x axis categories? In highchart?
- How do I make a Highcharts timeline where the labels don't overlap and none are hidden?
- how can I use rangeselector and navigation in highcharts in the given code
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- How to display legend in Highcharts Waterfall Chart and make the sum column of waterfall appear in multiple colors?
- I can't use gauge-solid and spline chart at the same time by using HighCharts
- how to display the date at X axis and other column at y axis in highcharts
- How to draw a chart from one array of data and make labels on the chart from another array of data? Highcharts v.4.0.4
- Highcharts : How to align column chart and bubble chart vertically in the same series
- How to create a column range chart in Highcharts using range and navigator functions?
More Query from same tag
- Create array from string - with complex types for highchart
- dotnet highchar data points are not coming with every record
- highcharts missing x axis labels when stacking two charts
- encode CSV to JSON according to certain scheme using PHP
- Highcharts. Specifiec label
- High Charts - dynamically place elements within tooltip
- Highcharts drilldown on area chart
- Chart series fixed range
- How can I change data series dynamically in HighCharts without overwriting initial series?
- How to make Column type series Secondary yAxis values dynamic and not always start with 0?
- How to create a highcharts dot plot graph? - R Highcharter
- Build a highchart chart using data from an external JSON
- add formatter for X-axis in Highchart
- Rails Not outputting Highcharts javascript graph
- Mouse out event on highcharts
- Highlight tooltip shared item depending on hovered serie in Highcharts
- Change plotBand label after creation [highcharts]
- Highchart categories issues
- Highcharts piechart labels going out of parent
- How to import highchart-more into angular-cli 6 project
- Legend in network graph ( Highchart Js)
- Highcharts add line-through to legend text when hidden (itemHiddenStyle)
- Step line in range selector with Highstock
- Delete Highchart top line with heatmap
- Highcharts donut chart remove border when at 100%
- Highcharts get data from database
- Highcharts data csv load
- Removing specific days from highcharts datetime graph
- highchart Customclass css not applied to tooltip for dumbbell series
- how to display array of objects in High stock charts