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 Query
- 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
- How to set minutes as units in Highstock chart using data from CSV
- how to remove time from Highstock chart at navaigater bar?
- How To Show Tooltip In Sparkline Chart From Code
- How to create a new Highstock chart with new Highchart and not jquery?
- How do I get remove of 'data table' option from High chart export
- 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?
- How to make a pie chart from highcharts responsive
- How can I prevent my HighChart bar chart from being inverted?
- How can I get the navigator selection from a Highstock chart?
- HighCharts : How to add or remove "chart context menu" from chart container?
- How do I select which columns from my CSV to chart with HighChart?
- How to get text from html table in pie chart (highchart)?
- Highcharts: How to resize chart from external JS?
- Higcharts - How to remove groupPadding from the beginning of the chart
- Highstock - Remove bottom date tooltip from line chart
- How to generate highcharts chart from multiple local json files
- how to take only categories for x-axis and remove unwanted scaling in Highstock chart
- How to hardcode chart data in my Model then have my Controller pull it from there to display it. Using Highcharts
- How set options from HIGHCHARTS in a chart using vue chartkick
- Highcharts: how to add padding/spacing from top of chart
- How to save and restore and Highstock chart with indicators?
- How to remove sliced line from pie high chart if there there is only one object in data
- 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 dynamically change chart type in highstock stock chart?
- How to create chart with highchart in which bar doesn't start from 0 in y axis?
More Query from same tag
- highcharts area range date format
- Highcharts chart event load not working for wordcloud
- Javascript HighCharts parsing CSV
- Highcharts xAxis labels do not auto rotate
- Highchart React not rendering heat map after refresh its throwing error
- Highstocks - Display year when hovering over a point
- highcharts col width and border-top
- How to Load More Than One CSV Using Highcharts Data Module
- Highchart (Column Chart) : Few data labels are not appearing for a series
- Highcharts date inaccuracy
- Disable all UI events on highcharts
- How do I make Highcharts half-donut appear in angular application?
- highcharts animation multiple spline per second
- How to show bar of graph in different colour when it reaches threshold level in high charts in JS?
- How to pass JSON data to update Highcharts Pie chart
- Highcharts series.remove(false) doesn't update yAxis.datamax
- How to change color of donut chart in highchart?
- multiple Drilldown in Highcharts using values from database in ruby on rails
- Highcharts vertical align legend symbol
- Avoid overlapping in highchart bubble chart
- How to import highcharts-more
- highcharts: stop chart from trapping mouse events, or capture mouse click on the ENTIRE chart
- @Param Plumber Doens't work with Highcharts - R
- Inefficient functions - how to assign colour to datapoints in Highchart
- Is it possible to customize the features of stack parameter in highchart.js library
- show value if multiple y values on xAxis are used
- lineWidth on both sides of chart
- How to find a point with longitude and latitude in a Highmaps maps serie, initiated with GeoJson?
- Combining Column charts and line charts with the same same data in the same container(Highcharts)
- Highcharts multiple axis gauge with 2 dials with different radii