Page 1 of 1

X- axis show all hours

Posted: Sun Jan 17, 2016 7:07 am
by jagathish
Hi,

Please check the given link. https://codepen.io/jagathish/pen/adLRqE

I want all hour should shown in X-axis label. and y-axis now showing, 0,5,10,15... i want 0,2,4,.. upto 20,

Thanks and Regards,
Jagathish

Re: X- axis show all hours

Posted: Mon Jan 18, 2016 11:34 am
by KacperMadej
To set ticks for yAxis you could set max to 20, endOnTicks to false (to make sure that max setting is not rounded because of series data), tickInterval to 2.

Code: Select all

        yAxis: {
            max: 20,
            tickInterval: 2,
            endOnTick: false,
For xAxis - set tickInterval to 1 hour, so 3600 * 1000 milliseconds instead of setting step or minTickInterval.

Code: Select all

        xAxis: {
            type:'datetime',
            //step: 24,
             tickInterval:3600 * 1000,
         
           //minTickInterval: 24,
Example: https://codepen.io/anon/pen/bEYdxN

Re: X- axis show all hours

Posted: Tue Jan 19, 2016 5:24 am
by jagathish
Thanks Lot.. Its works well

Re: X- axis show all hours

Posted: Wed Jan 27, 2016 4:18 am
by jagathish
The give example (https://codepen.io/anon/pen/bEYdxN) its working but i need to show , 23:59 at last.. is this possible?

Thanks & Regards,
Jagathish J

Re: X- axis show all hours

Posted: Thu Jan 28, 2016 4:08 am
by jagathish
Please reply for this??? above doubt

Re: X- axis show all hours

Posted: Thu Jan 28, 2016 4:05 pm
by KacperMadej
Hi Jagathish,

I you need additional label, than you could add null data to series' data array and change label formatter, so it will display '23:59' instead of every '00:00' instead of a first one.
Example: https://codepen.io/anon/pen/MKGVeN

Other option would be to change last label to '23:59', if you need to change it instead of adding next one.
Example: https://codepen.io/anon/pen/YwLaNr

If you have more questions, please let me know.

Best regards,
Kacper Madej

Re: X- axis show all hours

Posted: Fri Jan 29, 2016 5:04 am
by jagathish
Thanks... its works..