I’m not sure what you are trying to achieve here, all of the ‘look and feel’ for the gauges is in gauges.js which resides in your (nominally) ss skin directory in ss/scripts. The usual process is to make any ‘look and feel’ changes to gauges.js and on a WeeWX restart gauges.js is uploaded to your web server and the changes take effect. The variables holding ‘look and feel’ settings in gauges.js are config (starting line 36), gaugeGlobals (starting line 90), commonParams (starting line 142). The init function starting at line 207 also has some WeeWX settings (starting at line 333).
If you do pull all of these 'look and feel' settings out and put them in a template (or some other file) I’m not seeing the improvement; you still have to edit a file other than skin.conf/weewx.conf to change the gauges 'look and feel'. The current arrangement of having user config options in gauges.js along with the weather gauges code means that you need to take precautions or re-edit gauges.js each time there is an upgrade to the file. Can be annoying. If you use a template or a fixed .json file approach, you have all of your weather gauges settings in one place (well two actually because you will always have something in weewx.conf), but to do this you will need to insert some javascript code in gauges.js so you still have a manual edit process to go through with gauges.js should gauges.js be upgraded.
To me the real solution is to have the SteelSeries weather gauges author include support for ‘look and feel’ settings in a separate file. Whether he has any appetite for that I do not know. Also remember the SteelSeries weather gauges support a number of other PWS software suites not just WeeWX.
That being said I’ve learnt in my time with WeeWX that the user is always right. If you want to go down the path of modifying gauges.js to use external config settings if available I would be sticking to those ‘look and feel’ variables/function I mentioned above. Gong down further into the gauges.js code should not be necessary, and will likely drastically increase the risk of failure. Note that some of the ‘looking feel’ config settings used in gauges.js rely on variables in the underlying SteelSeries gauges code, eg line 102:
lcdColour : steelseries.LcdColor.STANDARD
I've gone through a similar process in implementing Highcharts support. The beauty with Highcharts is that Highcharts is written to obtain config details from an external file. Unfortunately that is not the case with the SteelSeries weather gauges.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/b9c42ab9-e144-4a3d-95ca-ad0068736f04n%40googlegroups.com.