score:4
Accepted answer
So here is the answer that I've got if anyone need it (here is the link to jsfiddle).
I set the time variables in ms:
data: [0, 0, 0, 0, 76320000, 25920000, 102840000, 0, 0, 0, 0, 0]
And then I format this value as I need:
yAxis: {
title: {
text: 'Time (hh:mm)'
},
labels: {
formatter: function () {
var time = this.value;
var hours1=parseInt(time/3600000);
var mins1=parseInt((parseInt(time%3600000))/60000);
return hours1 + ':' + mins1;
}
}
}
That's the only way I found to make y axis in pure hh:mm format. Also you can make the data not in ms, but in w/e you want or need.
score:1
then better use your own formatting method, here you will have more control on formatting. you can use formatter as shown below.
yAxis: {
labels: {
formatter: function () {
//get the timestamp
var time = this.value;
//now manipulate the timestamp as you wan using data functions
}
}
}
hope this will help you in achieving what you needed.
Source: stackoverflow.com
Related Query
- Making y axis of highcharts in time format hh:mm
- Highcharts with date and time for x axis (from a database with format YYYYMMDDHHMM)
- Highcharts | Making multiple y axis scales
- Highcharts label format with tickPositioner in a datetime x Axis
- Highcharts 12hr time format of x-axis labels
- Highcharts date time axis
- Highcharts datetime axis overlap with a long time series
- highcharts axis format decimal point
- How to add exporting date and time as user format in Highcharts exporter?
- Highcharts time X axis
- Time format with Highcharts
- how to zoom dual x axis at same time in highcharts
- Highcharts Time Series data from C# in a format required by HighCharts
- Highcharts format labels on grouped stacked bar diagram with $ k, M for currency and 'hrs' for time
- Highcharts xAxis doesn't get the right time format
- Highcharts - Format X axis with 2 digit hours in 24 hour format
- Format X axis Label of Highcharts
- Highcharts column width on a time series axis
- Highcharts datetimex axis incorrect start time and interval
- Show ticks on x axis in local time with highcharts api
- Highcharts - Custom X axis format
- Highcharts x axis date format issues
- Auto setting time axis range in highcharts
- highcharts - avoid repeating same date on x axis with different time
- Hide axis and gridlines Highcharts
- Customize tooltip and format the number to 2 decimal places of highcharts
- What format does the highcharts js library accept for dates?
- Format Highcharts y-axis labels
- Change HighCharts axis title
- how to set the interval of points on Y - Axis highcharts
More Query from same tag
- Highcharts Legend 'enabled' function not working
- Highcharts: resize plotBand if plotLine moves along xAxis
- Highcharts dual axes navigator
- javascript variable not works in Highchart
- Highcharts PieChart Legend paging faulty
- How to remove Board and HR/CFO from Highchart organization?
- chart does not plot line(s) from google sheet data
- Highcharts IE issues with jQuery ajax load
- Highcharts not showing value when two stacked columns have value = 1
- Point markers for arearangespline chart in Highcharts
- How to access React hook state in Highcharts event listener
- Give different color to each stack in stacked bar in Highcharts
- How can I display a Highcharts organization chart with level 1 nodes below other level 1 nodes?
- Highcharts: detect if tooltip is being shown
- Highcharts - Export button options offset using a little div
- How to create equal width solidgauge for any number of series?
- Is it possible to create a chart which has conditional coloring and also shows up in legend?
- drawing custom lines on highchart graph
- Highcharts show real time value on Labels
- where to put phantomjs.exe in Tomcat 7 on Windows 7
- Highchart - xAxis values are to close
- Displaying max value in bottom of the pie chart - highcharts
- Highcharts pie chart issue (gaps between pie slices)
- Highcharts not updating data on ajax response data
- Chart background highlight in HighChart
- Add new series[0].data into already existing highchart
- JSON Data formatting for Highcharts
- Highcharts yAxis labels click event
- Shows a single chart on Highcharts
- Show label of stacked columns only on hover (and also the previous and next column)