score:15
It's been a while since you've posted so I hope you've found your answer by now but I wanted to give you a response anyway.
You need to use the min option inside the X-Axis category. Read more about this here: http://api.highcharts.com/highcharts#xAxis
xAxis: {
min: 1,
categories: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']
},
These options include the '0' as a category but the chart is drawn starting at the '1' position.
I put together a simple jsfiddle showing what you wanted to accomplish here: http://jsfiddle.net/L35DP/
score:0
I'll do you one better. We can simply use the xAxis label formatter as a mapping function to map our index values from 0,1,...,n
to 1,2,...,n+1
by defining the formatter as:
xAxis: {
labels: {
formatter: function() {
return this.value + 1;
}
},
}
Indeed you could define this mapping function to be anything at all. For example:
formatter: function() {
return this.value * this.value;
}
Source: stackoverflow.com
Related Query
- Highcharts how to change x axis options
- How to change axis label size when exporting in Highcharts / Highstock
- How to change colors options in Highcharts programmatically?
- How to change highcharts graph axis colors on export?
- Highcharts Highmaps How to change value for color axis in map bubble
- How to change code in "Pie Chart" in HighCharts
- How do you change the colour of each category within a highcharts column chart?
- How can I change the colors of my highcharts piechart?
- Change HighCharts axis title
- how to set the interval of points on Y - Axis highcharts
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- How to change the text color in Highcharts
- How do I dynamically change a data point in Highcharts using JavaScript
- Javascript Highcharts v3.0.5 - How to hide Y Axis Title when using multiple Y Axis
- How can I change the unit at y axis dynamically at Highcharts?
- How to change graph colour above and below plotline in Highcharts
- Highcharts - How to start x axis from an arbitrary value
- Change Y Axis vertical line color in Highcharts
- Highcharts - how to disable color change on mouseover/hover
- How to add space between chart and axis in highcharts
- How to dynamically change axis from linear to logarithmic in HighChart
- Change HighCharts axis title in 2.1.4
- How can i change highcharts data values by selecting from a dropdown list
- How to show only specific x-axis values on datetime axis in Highcharts
- Angular Highcharts - How to enable noData options and update it dynamically
- How to change Highcharts xAxis label color individually?
- How to hide color axis in heatmaps using highcharts
- How do I configure the options in Highcharts to allow multiple drilldowns asynchronously?
- How to populate a Highcharts axis with string formatted data from a PHP array
- how to change local functions of highcharts
More Query from same tag
- X-Axis date fromatting in highcharts
- Highcharts Pie Chart turning off data label
- Highcharts solidgauge - repeatable div's - duplicate value in php variable
- How to change color of single column in Highcharts column graph when data is in CSV form?
- Highchart show grid lines on y-axis for every point
- Highstock chart export as PDF with image and text in title
- high charts: in bar labels only showing on some bars
- How to hide other series when clicking on legend on highcarts?
- How do I access total in Highcharts.stack anywhere in my javascript?
- Tooltip doesn't show properly in highcharts
- Render Two charts separate charts using angular js directives
- Data label is getting shown inside of the bar in sometimes
- Highcharts resize doesn't always work
- Highcharts: Stacking a column inside of another column
- 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?
- Highcharts accessibility / VUE.js
- Highcharts - Heatmap - Legend remove white "dashes"
- Highcharts - y-axis data label missing in Firefox
- How do I manage the imports in Angular correctly?
- Make Highchart use a specific targeted time zone
- Difference between hiding a div initially and hiding it dynamically
- setting tooltips for multiple range line series in highchairs
- How to set different colors for bars based on value in Highchart bar chart?
- add point to new series of some specific category
- Highcharts - Show the percentage difference between data points on a series
- Exiting full screen does not re-render graph to same size in highcharts exporting at angular 7
- Different color for different data labels
- Hidden duplicate legends in Charts
- Set Color for Pie Chart using HighChart + JSON data
- How to get points information when hovering over axis labels in highcharts using custom-events library?