jagathish
Posts: 31
Joined: Sat Nov 07, 2015 6:19 am

X- axis show all hours

Sun Jan 17, 2016 7:07 am

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

KacperMadej
Posts: 4507
Joined: Mon Sep 15, 2014 12:43 pm

Re: X- axis show all hours

Mon Jan 18, 2016 11:34 am

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
Kacper Madej
Highcharts Developer

jagathish
Posts: 31
Joined: Sat Nov 07, 2015 6:19 am

Re: X- axis show all hours

Tue Jan 19, 2016 5:24 am

Thanks Lot.. Its works well

jagathish
Posts: 31
Joined: Sat Nov 07, 2015 6:19 am

Re: X- axis show all hours

Wed Jan 27, 2016 4:18 am

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

jagathish
Posts: 31
Joined: Sat Nov 07, 2015 6:19 am

Re: X- axis show all hours

Thu Jan 28, 2016 4:08 am

Please reply for this??? above doubt

KacperMadej
Posts: 4507
Joined: Mon Sep 15, 2014 12:43 pm

Re: X- axis show all hours

Thu Jan 28, 2016 4:05 pm

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
Kacper Madej
Highcharts Developer

jagathish
Posts: 31
Joined: Sat Nov 07, 2015 6:19 am

Re: X- axis show all hours

Fri Jan 29, 2016 5:04 am

Thanks... its works..

Return to “Highcharts Usage”