score:1
For me dateTimeLabelFormats works perfectly fine, see: http://jsfiddle.net/wmFZx/
$('#container').highcharts({
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
hour: '%I %p'
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 2 * 3600 * 1000 // two hours
}]
});
score:1
For those coming in late like me(2yrs later), try this:
tooltip: {
xDateFormat: "%A, %b %e, %I:%M%p"
},
xAxis: {
dateTimeLabelFormats : {
hour: "%I %p"
}
}
Here's the JSFiddle: http://jsfiddle.net/4tat369x/
If you have multiple series and share the tooltip, you'll want to modify the dataGrouping dateTimeLabelFormats for your type of chart. Here's what it looks like for a line chart:
plotOptions: {
line: {
dataGrouping: {
dateTimeLabelFormats: {
millisecond: ["%A, %b %e, %H:%M:%S.%L%p", "%A, %b %e, %I:%M:%S.%L%p", "-%I:%M:%S.%L%p"],
second: ["%A, %b %e, %I:%M:%S%p", "%A, %b %e, %I:%M:%S%p", "-%I:%M:%S%p"],
minute: ["%A, %b %e, %I:%M%p", "%A, %b %e, %I:%M%p", "-%I:%M%p"],
hour: ["%A, %b %e, %I:%M%p", "%A, %b %e, %I:%M%p", "-%I:%M%p"],
day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"],
week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"],
month: ["%B %Y", "%B", "-%B %Y"],
year: ["%Y", "%Y", "-%Y"]
}
}
}
}
Source: stackoverflow.com
Related Articles
- How to switch from 24hr to 12hr clock in Highstock chart?
- how can I move yAxis labels from Right of chart to left of chart in highstock
- How to extract the data from highstock chart
- Highstock - Remove bottom date tooltip from line chart
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- How to set minutes as units in Highstock chart using data from CSV
- Remove day name from highstock chart tooltip
- Strange character in the Highstock source code
- how to remove time from Highstock chart at navaigater bar?
- HighStock navigator from a stacked area chart shows wrong series
- How To Show Tooltip In Sparkline Chart From Code
- HighStock chart from sensor data
- Change Highcharts tooltip formatter from chart Object , after chart is rendered
- highcharts: stop chart from trapping mouse events, or capture mouse click on the ENTIRE chart
- How to create a new Highstock chart with new Highchart and not jquery?
- Disable Print Chart option only from HighCharts
- Highstock Navigator always starts from 1970-1-1
- Displaying multiple series in the navigator of an HighStock chart
- How do I get remove of 'data table' option from High chart export
- Highcharts Column chart with drilldown, remove hyperlink like formatting from x-axis labels
- x-axis tickInterval not working correctly in highstock chart
- How do you remove x-axis labels from a highchart.js bar chart
- Highcharts - How can I remove starting and ending padding from area chart
- How to remove white space from pie chart in highchart.js?
- Add dynamic data to line chart from mysql database with highcharts
- How to make a pie chart from highcharts responsive
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Show gridLines when the chart is empty(no series) in highstock
- remove Highchart.com link from the chart
- How can I prevent my HighChart bar chart from being inverted?
- Position single data label of highcharts pie chart centered below the chart
- Highcharts - How to get a value of a stack in a series?
- How to create dynamic array fo array in javascript
- Highcharts:Column Range chart having height of bar same as the height of interval in y Axis
- Possible to use xAxis with type "datetime" and yAxis with categories?
- Highstock not showing all series
- Plotting XML/CSV Data in ASP.NET Charts (in VS2008 using VB code)
- How can i call a Rest API from a Vue component?
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- column highchart overlapping and axis X line issue
- Read data from Highcharts
- Display User info from Meteor.users, and display with Highcharts
- Spline chart tooltip only snaps on x-axis
- How to display custom or non-series data array on Highcharts tooltip on hover?
- Chart using highcharts and Json asp.net MVC
- Highcharts series data
- Php to JSON passed thru to high charts
- xAxis order of R highcharter column plot
- Issue removing and readding series to chart
- Generate/export table+graph in highcharts in PDF format