Hi,
I have been trying to use the timezone support from flot from GWT for a few hours, and I am stuck.
For now I have found the following requirements :
- Add timezone-js script to GWT project (either from gwt.xml or html page)
- Add jquery / fleegix library for ajax loading of tz data or custom js function (i used jquery)
- Add tz files in webapp
- Add init code ; sometjhing like :
public static native void initTimezoneJS() /*-{
$wnd.$(function() {
$wnd.timezoneJS.timezone.zoneFileBasePath = 'myproject/tz/';
$wnd.timezoneJS.timezone.defaultZoneFile = 'europe'
$wnd.timezoneJS.timezone.init({ async: false });
});
}-*/;
My project uses xsiframe linker, so I added scripts from the html page header:
<script type="text/javascript" src="js/jquery-2.1.1.min.js"/>
<script type="text/javascript" src="js/timezone-js/src/date.js"/>
Now the plot stays solid white when I use TimeSeriesAxisOptions.setTimeZone().
If I don't call setTimeZone() the plot displays successfully.
Any clues or link ? My impression is that this issue is due to the non global javascript environnement in GWT project.
Thank you in advance,
Cyril