score:11
It's one of those days
I'm in the UK so UTC true or false gives the same results since I am in GMT. My discrepancy between my expected displayed time was due to a parsing issue in PHP to unixTime.
score:0
use timezone by getfunction Example: Using getTimezoneOffset
var x = new Date();
var currentTimeZoneOffsetInHours = x.getTimezoneOffset() / 60;
score:1
Add this code to the document.ready and you should get the highcharts in your local timezone if you're feeding it UTC time
$(document).ready(function () {
Highcharts.setOptions({
global: {
/**
* Use moment-timezone.js to return the timezone offset for individual
* timestamps, used in the X axis labels and the tooltip header.
*/
getTimezoneOffset: function (timestamp) {
d = new Date();
timezoneOffset = d.getTimezoneOffset()
return timezoneOffset;
}
}
});
});
score:4
Highcharts have moved this option in more recent versions.
One thing to keep in mind is that your shift seems to be the inverse or negative of where your local time from UTC, so if you're in UTC+2 for example, then your timezoneOffset
is going to be -2 * 60
, which is not entirely intuitive:
Highcharts.setOptions({
time: {
timezoneOffset: -2 * 60
}
});
API documentation: https://api.highcharts.com/highcharts/time.getTimezoneOffset
Here is an example of it: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/time/timezoneoffset/
score:6
Nothing you are doing seems to be wrong. This jsFiddle shows a shift in the x-axis when UTC is disabled in the global Highcharts options.
score:7
Highcharts now supports timezones in 3.0.8
You can now set the timezoneOffset global property: http://api.highcharts.com/highcharts#global.timezoneOffset
Source: stackoverflow.com
Related Query
- Timezone on Highcharts
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- HighCharts Stock Chart error code 18
- highcharts change rendered image source on click
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Use of DotNet HighCharts dll to make charts in code behind
- Format highcharts date tooltip to display timezone
- How to edit tooltip in Highcharts C# code
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- passing json values to highcharts from .net code behind
- how to use highcharts tooltip formatter in python code
- HighCharts timezone issues on AngularJs
- passing formatting JavaScript code to HighCharts with JSON
- Unable to set timezone in Highcharts graph
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- Add Source to Highcharts Export CSV
- Highcharts v4.0.4 plotting local timezone
- Include additional highcharts source data in angular2 app
- Conditions within highcharts code
- Strange character in the Highstock source code
- What's the code in Highcharts such that the bars (columns) in the same group use the same color?
- Highcharts series visibility with csv data source
- Highcharts showing wrong time based on timezone
- HTML table as data source for highstock charts using highcharts
- Including source for Alchemy js breaks Highcharts js
- Highcharts SVG Export from Python Server Side Code
- Changing the epoch to respective timezone in Highcharts and showing the time on x-axis
More Query from same tag
- Border around legend item in highcharts
- Highcharts graph remove existing ticks in interval on a category (x-axis)
- Plotting multiple series in single Highcharts plot from JSON
- highchart not rending in rshiny but is working in my directory
- How to use highmaps in react?
- HighMaps Only Displaying Color For Last Series In US Map
- tick interval is not working while applying tick interval its showing x and y both values
- HighCharts long title text overlapping on some elements
- Is there a way to use two series (or some kind of group) in highcharter wordcloud?
- Highcharts write xaxis values on 2 different lines
- Highchart / Highstock shows unformated tooltip lable when data grouping enabled but not used
- how to center text inside donut chart embedded in combination chart
- Highcharts - Get crossing point of crossing series
- Is it possible to create a bubble polar chart with Highcharts?
- WpDatacharts (Highcharts render) - is it possible to pre-hide data sets on load?
- Highcharts Detect mouseOver event only in the colored area
- Is there a way to get the coordinates of a Segment that I draw on the HighCharts stockChart?
- How can I use an angular component more then once?
- Highcharts - timeseries chart with y-axis values need to be group with text labels
- angularjs & highcharts - setting up properties in directive
- How to Multiply two arrays and dynamically plot into HighCharts?
- High Charts - Set Solid Gauge Value from JSON
- Format categories (x-axis) for highcharts
- Highcharts IE issues with jQuery ajax load
- Dock highcharts legend to very bottom of chart
- How do you execute javascript on demand
- Highchart - Bell curve fill colour based on percentage
- How to get current level on drilldown event in Highcharts treemap?
- Highchart - Displaying the last yaxis value in the guage
- how do you create muliple charts with the same options but with different data