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
- Reserve space for text in exported Highchart
- Highcharts x-axis labels not starting on bounds
- python/flask/Jinja2 and Json
- Highchart xAxis "6 Hours Ago" ,"5 Hours ago" and so on. while my chart is updating
- highchart How can I get width parent element for calculated x max in xAxis
- Can we set bar labels with dynamic custom array in Highcharts?
- How to add trend line to high charts
- add chart using highcharts to angular via highcharts-ng directive
- ReactJs HighCharts toggle table and chart not updating
- How do I make a same range
- HighChart Line Draw issues(How to draw contineous line between 2 points )
- Dynamically adding series, how to get rid of default y-axis?
- how to configure highmaps of highcharts in ruby on rails?
- highcharts hover with negativeColor property gives wrong color
- Highchart Heatmap Tooltip get x or key in HeaderFormat
- Angular 2 - HighCharts implementation: Cannot find name 'HighchartsOptions'
- Highcharts synchronise range selector and navigator on 3 charts
- how to set the interval of points if I have 2 Y axes
- Highcharts Tick Positions are not aligned on multiple Y-axises
- Override Highcharts waterfall isSum() value
- Multiple Series Timeline with HighCharts
- How do I stop Highcharts creating a new gridline at the extremities of the chart unless a data point exceeds the min/max gridline?
- onclick display donut chart pieces' information in center
- Highchart auto pageup the browser when data is updated
- Vertical areas along with line on the chart - is that possible
- how to plot the data value from JSON in Highcharts
- Print target labels on xAxis with labels.formatter
- Viewing IP in highcharts
- Coloring Country while showing mappoint for cities in world map using highmaps
- Stop HighCharts change transparency of another series on hover of one series