score:17
Accepted answer
Try this:
$(function () {
var seriesData = [["apple",29.9], ["orange",71.5], ["mango",106.4]];
$('#container').highcharts({
chart: {
},
xAxis: {
tickInterval: 1,
labels: {
enabled: true,
formatter: function() { return seriesData[this.value][0];},
}
},
series: [{
data: seriesData
}]
});
});
SEE DEMO
score:3
No need to do it manually the better solution is just pass type: 'category' in xAxis block. Look below snippet
xAxis: {
type: 'category',
labels: {
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
},
}
}
score:5
You can use catgories
in xAxis
xAxis: {
categories: ["apple", "orange", "mango"],
}
I've updated your fiddle: http://jsfiddle.net/Lq6me/1/
If you don't want to use categories you can go for
labels: {
formatter: function() {}
}
Source: stackoverflow.com
Related Query
- HighCharts Bubble Chart: text for axis interval labels
- How to add text labels to a numerical x axis in Highcharts
- How to hardcode arbitrary Tick text labels on y axis in highcharts
- Highcharts text labels for y-axis
- Highcharts X-Axis labels as Text
- Highcharts - Long multi-line y axis labels causing following label to be removed
- Highcharts - with datetime axis labels overlap
- Highcharts - Multiple Axis Graph not displaying labels
- Show some specefic number on gauge highcharts axis labels
- How to adjust line-height/ellipses in Highcharts axis labels
- Highcharts x axis label text wrapping lost on setting label step
- Highcharts -- Can't apply style to x axis labels
- How to position labels for plotbands on y axis in Highcharts
- Highcharts Gauge Chart with text labels
- Chart's width is impacting to my second x axis labels in Highcharts
- How To Show All Data Labels For Datetime Axis In Highcharts
- Wrong labels on X axis on Highcharts
- Replace axis labels with custom in highcharts r
- How to handle mouse events on axis labels in highcharts
- Fourth y axis does not show labels in Highcharts
- Multiple images for Highcharts X Axis Labels
- Alignment of y axis labels and text
- Highcharts datetime axis labels according to data point groups
- highcharts missing x axis labels when stacking two charts
- x Axis Labels are cut off from Highcharts Column Chart
- Highcharts and EXTJS 3: Labels in x axis overlap
- How to display months in x axis labels in highcharts
- Dynamic Labels for X axis in HighCharts
- Highcharts is formating x axis text values as dates
- Highcharts streamgraph Y Axis Labels
More Query from same tag
- Get the x axis range on selecting a zoom range in Highcharts
- Highcharts-Angular not working with Angular Universal
- Gradient Fill on Line Chart (Highcharts)
- Highcharts- Creating a dynamic x-axis to maintain bar spacing with less data points but maintain x-axis "width"
- In Highstock charts, Drill down not correctly showing when scrolled
- HighCharts query parameters issue with Flask webservice
- Highcharts Maps - Displaying data on Highmaps
- Drawind Dynamic series and points with Highchart and ajax
- Convert CSV webservice into multiple year Highcharts line graph
- How to create a HighCharts chart in react
- Highchart.js secondary axis not showing on the opposite side
- How to get Node Coordinates Data in Sankey Graph
- Cannot implement lazy high chart receiving errors
- Data filtration React Highcharts
- Spider Highchart - different color for each gridline
- how to draw end line on x axis in highcharts
- Highchart automatically add quotes to the variable
- Time not showing correctly in HighChart
- How to add separate annotation style tooltip for Highcharts marker?
- In Highcharts Make tooltip of a specific point always visible and dynamically i will change its point
- level series in a highchart
- How to create vertical merged stacked bar in highchart
- Highcharts stacked column dataLabels overlapping
- Highchart Heatmap chart for days in a month
- HighStock setup
- Echarts how to highlight area between 2 line charts
- HighChart bubble chart is not working
- drawing two spline series with different number of values
- Highcharts data module JSON api call setTimeout 30 sek
- Highcharts and NPM/Node