Question about which graphs display

Having now re-installed my re-worked JPGraph (wxgraphs) package to move away from Flash graphs I decided to add the graph pop up back on my steelseries gauges. They work well however I am wondering why some display a 1 hour graph and others a 24 hour graph. Is there currently any way to select which graphs are used for each gauge? I’ve not found a simple setting so I guess it needs some editing somewhere.

Stuart

Edit: I must add that although I have reworked my original JPGraphs (wxgraphs) I’ve not changed the file names, just the internals and made some changes to allow further customisation of the graphs. I will publish the new package later when I’m happy I’ve got it all working correctly.

You find the list of used graphs at
www.stella-maris.org.uk/wdl/scripts/gauges.js line 200 and further.
There are definitions for each weather-program, line 228-240 are the WD-wxgraphs ones.

Wim

Thanks Wim, I’d probably have got there in the end but you saved me some time. I now know why you cannot have all 24hr graphs because when I created the wxgraphs package I did not create some of them with 24 hour data #-o Anyway I’ll look to see if I can rectify that in the new package when I build it.

Stuart

Well I now have the graphs working on my gauges which is on the Live Weather link on my website. I have modified the gauges.js to use only 24 hour graphs and I created a new humidity only 24 hour graph. I also changed the wind gust to an average speed graph. Anyway if anyone is interested just take a look.

I will try to get a new package together in the next couple of days or so of my wxgraphs which now allow easy changing of fonts and font sizes as well as a few other changes. The default package will work with the JPGraph supplied fonts as shipped which should allow anyone to be able to test it without messing with the fonts, as not all web hosting sites seem to have all the usual fonts. I’m hoping Mark will consider making the graph names customisable rather than editing the gauges.js file although it is not difficult.

Stuart

Will your new package work with the latest jpgraph?

If you build a new package, can you please rename the graphs to “Windows IIS” allowed names. So without a + sign?
Wim

Yes I can but why is IIS so awkward, probably 95+% of web servers run Linux or at least *nix and it means everyone who uses the package today will have to re-write their file names on their websites. Microsoft should come into the 21st century! To be honest I’ll think about it but for me its a no brainer to leave it as it is because I use *nix. To be honest this is the first time since I created my package in 2008 anyone has asked, and I’m feeling bolshy :wink:, so I honestly cannot see a reason why I should.

Stuart

I understand the extra burden for the other users, that is OK with me.
The reason for this question:
Every user of the Leuven-Template uses the Steelseries gauges also
Biggest group has clientraw files, WeatherDisplay, consoleWD, Meteo* en Wswin, so they use wxgraphs for the pop-up graphs

I think about 10% of them run into this problem when the server refuses to load the scripts because of that + in the names.
With IIS there is always extra support as other special characters, such as | give problems also.

I will include for the next release a small man-in-the-middle script which load your + version for linux users and warn the users when they are using IIS.
Problem solved.
Wim

Wim firstly let me apologies for my tone in the previous update, I was not in a good place… I just get very frustrated with the silly restrictions in Windows s/w.

Thanks for the suggestion that would be great and I think save a lot of work for the majority of users.

Off Topic, one Computer magazine today here in the UK has an interesting article about keeping your online banking safe, or at least safer (in the ligh of the huge attack on Tesco Bank) and they suggest NOT using any Windows platform to do your online banking :roll: Shows how much faith they have in that platform. :wink: #-o

Stuart

Everything I have seen indicates that the Tesco hack was a direct attack on their systems, not any kind of user side compromise. Unless Tesco bank was running windows I don’t see the connection :?

I think the article was written long before the Tesco fiasco, as yet no one really knows how they got into Tesco Bank, and the reference to Tesco was mine not theirs. More generally they feel that users Windows systems are more exposed. They also quoted the recent Which magazine article criticising some banks for the lack of two stage logins.

Stuart

Hi Stuart, I’m not really sure how I achieve that?

You will have to edit gauges.js anyway*, I could move them closer to the top of the script, but it is quite a list of filenames when multiplied by the number of clients supported.

  • unless it went in an external config file, but that would mean an extra download and delay to the page load. Though it has been suggested in the past that ALL the config variables go into a separate file to avoid users messing up the main script.

Mark I understand the issue, it is not a huge deal for someone to edit the file names if required, although as you say editing a program can be problematic for some. That’s why I externalised the config and lang files for the graphs, and have extended the config file in the new package. In my case there are a large number of files to edit to change font name for example so it makes sense to externalise it. I know it’s an additional file to upload but that only happens once, however it does mean it needs to be added to the data downloaded to the users browser as it is js, in my case its all done on the server. Perhaps moving the names to the top of the file and make them a config item which the program handles later is the best option, but it was only a suggestion :wink:

Stuart