In Highcharts I want to change the default starting point from 0 to 1 is where can i find the option to change I have only data points so that are plotted on y axis and the x axis simply contain the default numbers ie 0,1,2, etc.. i want to change the starting point from 0 to 1
thanks in advance
A simpler way to go about this is using the tickInterval attribute: yAxis: { title: { text: 'Percent' }, tickInterval: 10, labels: { formatter: function(){ return this. value + '%'; } } }, That will force your axis intervals to show up as you requested.
The plotOptions is a wrapper object for config objects for each series type. The config objects for each series can also be overridden for each series item as given in the series array. Configuration options for the series are given in three levels. Options for all series in a chart are given in the plotOptions.
use chart. setSize(width, height, doAnimation = true); in your actual resize function to set the height and width dynamically.
Use the options marginTop , marginRight , marginBottom and marginLeft for shorthand setting of one option. By default there is no margin.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With