HighCharts11->12 date format problems

@ALL uswers of pwsWD and forecast scripts

Highcharts is often used to draw the frorecast graphs.

As a few day ago, the brand new version 12.0 has a problem with correctly translating the day-names.
In the past the function dateTime with %a returned the short english weekday, f.i. “Wed”
The scripts then often translated that into the local visitors language both for short or long day-names.

Now the scripts return the local language for “Wed”, f.i. with the Dutch language it is “Wo”
The translation tables in the 3in1 scripts (ewn, leuven) and the pwsWD forecast scripts have no “Wo” value and javascript than returns “undefined”.
The day-names in the footer of the graphs remain empty and in the pop-up the text “undefined” is shown

To quickly solve this:
Scan the scripts for src="https://code.highcharts.com/highcharts.js"
Change that to src="https://code.highcharts.com/11/highcharts.js"

There seem to be other smaller problems, if you find one, please post with a link to the website page.

Wim

There seem to be no problems with English, is that right?

All languages have problems and show “undefined” or nothing.
But not all scripts are identical, so there could be one which does not fail.

Using /11/ in the link also solves the problem.

Wim

Is that what you see on my beta page? Here’s what I see:

And 24-hour graph:

That’s why I asked. . .

The top one is a forecast, the mouse is between thursday and friday → correct
The bottom one is the 24-hour/day-graph
The mouse is to the left of Wednesday so the pop-up shows correct Thuesday 21:45.


The missing day-names occur if the “browser” copy of highcharts is a 12.0.2 version.
If you use the old version of the scripts, please check the highcharts javascript in your browser.
Or use right-click->inspect → DeleteCache and force reload.

Still it is possible to get an old version if the proxy or cloudflare is used.
Wim

Your website is using the real latest version if visited from the outside world.

Check your browser cache.

Try to use your phone as a hotspot and bypass the proxy-server.

. . . if visited from the real world :laughing:

No phone, no tablet, just a desktop computer :wink:

test this one
it forces to use version 12
and it forces a reload

PWS_graph_day.php.zip (9.5 KB)

Before (using script from https://discourse.weather-watch.com/t/test-highcharts-problems/74584):

After:

OK, I think I see what you mean. Before this test script “the last 24 hours” graph was blank from 22:50 to 00:10. Now at 23:55 I can still see a graph of “the last 24 hours” even though it is headed “any day”:

At 00:11 we are back to “the last 24 hours” as usual:

Is this what you expected?

BTW, the rain problem (https://discourse.weather-watch.com/t/graphed-rain-interpolated/74581) is still present (although not shown here).

That did not help for the invalid and duplicate data around midnight.

The request for last 24 hours is handled by the php-code for “1 day” during the period of “unwanted / invalid data”
It is using a different WU-request for the data similar as for any other day.
That code uses the data for one day only.

I change the drop-down between 23:55 - 00:10 to make sure I can see on the screenshot which code is used if there is a problem posted.

Yes as there seem no problems after at least one upload to WU in the new day

That is not a problem we can solve.
It probably is a new feature, same as translating the day names to the visitors browser setting.

The data is correct. The whole period contains correct zero values for cumulative rain but it will not move the graph-line to zero.

Maybe a future update will solve it, maybe there is a HighCharts setting, but for now I can not change that behavior .

Wim