Page 1 of 1

Details of Themes related to Graphs

Posted: Mon 27 Jul 2020 8:08 am
by HansR
In discussion with Tony and Javier about the Dark theme, it appears CumulusUtils makes a lot of things possible but not everything.
Especially details in cumuluscharts.txt (the generated graphing procedure which originates from CMX).

So in a recent mail exchange with Tony about his changes to cumulscharts.txt I came up with the following. And as this is about individual graph colouring and how to handle the default, I prefer to talk about it in the forum as a single point of comms iso multiple mails.

Given what I was send and what I have seen from HighCharts, I have the following remarks:
  1. HighCharts seems to have moved to CSS and seems to have abandoned some themes. Is there any preference how to deal with the HighchartsDefauls-system? I think it is easiest to stay with the current system as the options setting is very clear. I could publish the existing defaults for various themes on the forum Colour settings, defaults and user modifications. I am not a HighCharts specialist, some help on how to optimise the configuration is welcome.

    Please Note that a HighchartsDefaults.js file MUST start with :

    Code: Select all

    Highcharts.theme = {
    And after the HighCharts javascript initialisation code the file MUST end with:

    Code: Select all

        // Apply the theme
        var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
    
  2. You modify degree and m2 symbols etc. That is surprising because all files and the website are UTF8 encoded and do not see a a problem of that kind anywhere. So I don't think this is necessary. The degree symbol should display normally within the website unless override of any encoding?
  3. The axis labels originally have a red/blue colouring on all graphs (around value 0) coming from the temp graph where it is functional (but in the other graphs it is not). I suggest to make this the value of the parameter ColorReportviewText as that will always be chosen such that it is visible against the background. No more two colour formatting of the labels.
  4. Using spline iso line is a good idea, I'll change that anyway.
  5. Line thickness of 1 iso 2 is suggested. The only drawback is the horizontal line in the rain graph which becomes invisible behind the gridline. I most likely can fix that with a zindex value (or fix that width to 2 as it is more visible as a boundary). So I think about parametrising or simply fix it to 1.
  6. Line colours should be possible to specify in the theme. If that is not possible - I did not look at it in detail tbh - I am thinking about parametrising line colours for each graph individually with the current defaults (so for 'normal' users nothing would change) but gradients will not be used/implemented.
All other colouring issues have already been solved I think by either the Color* parameters in the inifile or by using the HighchartsDefault construction with CumulusUtils.
Comments are welcome, there is no timepath to get this done but I don't think about very long term.

Note: the subject is not only relevant for Website Generature-users, but also for Module-users.
Note2: the HighchartsDefaults also have effect on the other charts in CumulusUtils, not only the CMX charts.

Re: Details of Themes related to Graphs

Posted: Thu 30 Jul 2020 6:34 am
by HansR
OK, I am a bit further in experimenting on how to do this theme thing.

Core starting point for me is, that the user does not start meddling with the generated code or supplied libraries, for the graphing or otherwise, to accomplish some preferred [colour] setting. I don't like that, the code is not intended to be modified and it makes more complex themes almost unreachable for users who are less knowledgable in handling intentionally slightly obfuscated code. Beside that, I may change the code at any moment without giving any prior notice and the theming through code modification would easily become a burden for the user causing irritation. It does with me anyway :mrgreen:

It has to be a one time setting outside the code, easy to understand and easy to modify.

My working hypothesis at the moment is that I will reduce settings in the code such that the defaults take over where possible.
The user has only to set colours for CumulusUtils in the inifile and the graphing colours - including the line colours, possibly lineWidth - only in HighchartsDefaults.
I will then supply several basic defaults on the forum (only one in the distribution) out of which the user can choose the basis and modify this basis to his preference.
When updating - I have to see how to do this - these defaults will not be overwritten. Any modification of the defaults outside the colouring is the users own responsibility.

If we agree - @BeaumarisWX and @kocher - on this method I will make a test version to see if this is sufficient (test against the standard and the Dark defaults).

1) Would you as basic stakeholders for the Dark Theme (which is at the basis of this configuration issue) do the testing with the config beta's?
2) And yes, other users interested can test as well of course. Let me know if you are interested. Betas will be sent over the email/PM.

NOTE: I have seen that the CumulusUtils graphs may have some alike issues although so far they seem to do well. It is the stddev and normal values (fixed black and grey colours) which seem to have a problem. We will address that later.

Re: Details of Themes related to Graphs

Posted: Thu 30 Jul 2020 8:26 pm
by kocher
Good evening Hans

I thank you for the interest you are putting in the matter of the Highcharts colorse. I think it matters.

I bet on a graphic with a dark frame, since it makes it easier to read, especially at night. It seems to me a very good idea to be able to choose the color of the theme and the colors of the variables.

What you do will improve the quality of your application even more :clap:

Re: Details of Themes related to Graphs

Posted: Thu 30 Jul 2020 9:44 pm
by BeaumarisWX
Hi Hans,
Agree, yes will test.
Kind Regards,

Re: Details of Themes related to Graphs

Posted: Fri 31 Jul 2020 6:04 am
by HansR
OK, Thanks.

I am preparing a system which uses only HighchartsDefaults (theme) and the inifile as places of configuration without any requirement to meddle with the generated code. A graph theme will be installed by using one of the supplied themes and copy that to HighchartsDefault. User can modify that theme (or create his own completely) and modify colours deviating from the supplied defaults in the inifile.

Graphlines colours will be used from the defaults in the HighchartsDefaults-file or - if specified from the inifile. In the last case, a colour is line specific. When using the defaults it is just the order of the colours and the lines used. Trying to get area grading colours as well in the system.

I'll be looking for remarks on correctness (does it work as intended) and suggestions for improvement/other ways.

Probably not today because temps here should go to the 30 degrees, but I'll send a PM with beta when ready.
(hope this is clear, a more elaborate description will be in the manual)