Skip to content Skip to sidebar Skip to footer

Displaying Yaxsis Data For Columnrange Highchart

I have a column range highchart . it works fine but it doesn't display time on yAxsis but tooltip does. it is in json format (tooltip time ) . Any help appreciate .. my yAxsis lo

Solution 1:

It displays the time in %H:%M:%P (in your JSFiddle), which is hours, minutes and am/pm.

Why does it all say 00:00:am? Because Highcharts has figured that the most reasonable spacing between ticks is some exact number of days, all starting at midnight. To see that they are not all the same you can add day, month, year or similar to the formatter. You can also manually control the tick spacing, if that is desired. See tickInterval in the API and similar yAxis options.

Your formatter isn't selecting when ticks occur, only what text they show. To check this you can do:

yAxis: {
    type: 'datetime',
    labels: {
        formatter: function () {
            return Highcharts.dateFormat('%e. %b %H:%M:%P', this.value);
        }
    },
    title: {
        text: 'Y Sside New'
    }
}

Which adds the day of the month and month name, and you can see that they are different.

See this JSFiddle demonstration.

Post a Comment for "Displaying Yaxsis Data For Columnrange Highchart"