score:14
Accepted answer
After playing with an official example and the documentation, I found a way to get intervals every two hours but you can get easily intervals every hour.
Here are the options you have to define in your Highcharts creation:
$(function () {
$('#container').highcharts({
chart: { ... },
title: { ... },
subtitle: { ... },
xAxis: {
type: 'datetime',
tickInterval: 3600 * 1000,
...
},
yAxis: { ... },
tooltip: { ... },
legend: { ... },
plotOptions: { ... },
series: [{
...
pointInterval: 3600 * 1000,
pointStart: Date.UTC(2006, 0, 01, 0, 0, 0, 0),
data: [
...
]
}]
});
});
Playing with the tickInterval
, pointInterval
and pointStart
options, you can obtain what you want.
Here is a live example of what I am talking about: http://jsfiddle.net/FxD58/1/
It works very well if you have 24 values in series (like the 24 hours in a day...)
Source: stackoverflow.com
Related Query
- Highcharts with date and time for x axis (from a database with format YYYYMMDDHHMM)
- Highcharts date time axis
- How to add exporting date and time as user format in Highcharts exporter?
- How to tell Highcharts to set date on the x axis, and use a range of time (like 1 day)
- How to disable the date and time mentioned in the navigator part and not on the x axis in highstock?
- How to get current date and time on highcharts
- How to call another function on changing the time range selector and date selector in Highcharts stock?
- Display Date and time on highcharts
- Highcharts - Performance issue using chart with x values date and TIME
- Highcharts datetimex axis incorrect start time and interval
- highcharts - avoid repeating same date on x axis with different time
- how to display the date at X axis and other column at y axis in highcharts
- Hide axis and gridlines Highcharts
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Populate Highcharts X-Axis With Dates Given a From And To Date
- How to add space between chart and axis in highcharts
- Highcharts blank chart with x and y axis
- Highcharts - Display only year in x axis and stop auto formatting
- Style highcharts x and y axis
- Dual axis using percentage and absolute value to same serie in Highcharts
- Highcharts - Bar - Setting the X axis width and the chart area width to be constant
- Legend and Axis titles not showing in Highcharts Graph
- Legend and Axis titles not showing in Highcharts Graph
- Highcharts - Global configuration with common code and unique data & Headings
- how to assign date time to highchart with intervals and date start
- Highcharts x axis date full range even if there is not enough data
- Highcharts X-Axis time from JS date
- Making y axis of highcharts in time format hh:mm
- how to pass values to tooltip which not in x and y axis in highcharts
- Difference between highcharts and highstock during real time trace and xAxis with max value
More Query from same tag
- highcharts series type 'flags' do not show point out of series
- return json arrays from symfony controller for many usage on highcharts.js
- Unable to render SVG as dataURI in Highcharts marker
- Javascript datepicker date defaulting to 01-01-1970 HighCharts
- Get selected point(s) indices on zoom in Highcharts
- HighChart And R weird Column chart breaks
- Different node tooltips in highcharts sankey diagram
- Switch from pie to column and show labels
- How to call a JS function every 10 sec which then activates a function in angular
- How to put data in Highchart from session storage?
- Grand Totals in HighCharts Pie Chart Legend
- d3 graph freezes with highcharts
- show .Net core web API response in highcharts
- How to draw multiple segments overlapping and non overlapping in high-charts?
- Semi donot chart with highcharts
- How to generate two heatmap on same scale?
- Pass Json Object from Play! framework to HighCharts JS
- Formatting the float numbers in Highcharts
- Repeating Javascript Code
- Highcharts: minorTickInterval doesn't work with specified categories
- Highcharts graph remove existing ticks in interval on a category (x-axis)
- C# DotNet.Highcharts Column datalabel percentage
- re-rendering EJS file after an ajax request
- Highcharts yAxis is not scaling to fill available height
- How to hide the export button in highcharts-ng
- Heatmap: Append new data rows
- Highcharts don't export custom SVG elements added after created
- Dynamic PlotLine in Highcharts
- Use images in Highcharts as xAxis labels
- Generating json data for StockChart from PHP