Page 1 of 2

Graph upload

Posted: Tue 20 Jul 2021 8:47 pm
by Armond
Hi again!

I want to upload graphs to my website.
I am comfused about how to do it. I have read about CumulusUtils, but I dont really get it.
Can somebody give a little help to a beginner. I am using a Raspberry Pi.

Re: Graph upload

Posted: Wed 21 Jul 2021 4:54 am
by HansR
@Armond: Do you have a website already would then be the first question before telling how to get it to your server. Or do you wish to make use of the standard website or any of the templates

Cumulusutils is a tool which creates parts for your website or creates a complete website. It can upload automatically but it has to be configured.
If you have questions about it but think it may be useful for you, please ask about it in its own thread for newbies. It has its own part of the wiki.

Your question should be asked in any of the threads for the website templates or in the MX thread itself.

Re: Graph upload

Posted: Wed 21 Jul 2021 5:12 am
by HansR
I just found out you do have a working standard MX site including the charts.
So what would you like to achieve would be my first question?

Re: Graph upload

Posted: Wed 21 Jul 2021 8:08 am
by Armond
I just found out you do have a working standard MX site including the charts.
So what would you like to achieve would be my first question?
I would like to have the graphs in my web template instead of the standard MX site.
@Armond: Do you have a website already would then be the first question before telling how to get it to your server. Or do you wish to make use of the standard website or any of the templates
Yes, I have a website already.

Re: Graph upload

Posted: Wed 21 Jul 2021 9:01 am
by freddie
iframe?

Re: Graph upload

Posted: Wed 21 Jul 2021 10:31 am
by HansR
I don't think iframe is required but @Armond you will need to create a page to use the cumuluscharts.js from CMX and you will need to find out what is required to include those charts and what you need to do on the HTML level. This is not really general knowledge because it has to do with your site.

Using the standard CMX charts will always require some study of the system. It could help to look at the page in your standard MX site and see how it is done there, then copy the important part to your own site.

CumulusUtils may help because it creates .txt files which you can include at any position in your site. It would still require some study though. It is different from how CMX works.

Re: Graph upload

Posted: Wed 21 Jul 2021 8:46 pm
by Armond
So I did a page with just the graph, http://ludvikasegel.com/mx/trends_weathergraphs.htm.

I have to combine my website css and CumulusMX template css to get what I want.
The only thing is that the wind direction does not work.

My first step completed, to be continued...

Re: Graph upload

Posted: Thu 22 Jul 2021 3:21 am
by beteljuice
@Armond

If you wish to keep your present layout of all (required) graphs showing at once

It is possible with some careful editing of the relevant js file. (The data / configuration(s) are from a 'donor')

Re: Graph upload

Posted: Thu 22 Jul 2021 8:08 am
by Armond
It is possible with some careful editing of the relevant js file. (The data / configuration(s) are from a 'donor')
@beteljuice That is exactly what I want. Can you give a explonation how to do it?

Re: Graph upload

Posted: Thu 22 Jul 2021 9:08 am
by beteljuice
Everything you need is there ... (I've only shown / modified the items I saw on your test page buttons)

I've commented the html example and the js.

Here's direct link to the js file (trends)

Re: Graph upload

Posted: Thu 22 Jul 2021 12:20 pm
by Armond
@beteljuice Thanks a lot!

Though am I not really sure how to put everything together.
Where do I put the armond_cumuluscharts.js for instance?

Re: Graph upload

Posted: Thu 22 Jul 2021 3:22 pm
by beteljuice
Where ever you want really - as long as you reference it correctly at the bottom of the calling page.

In my example I've used the default cumx layout (ie. the holding page is in in newmx/) and there is a sub-folder newmx/js/ ???

Just view-source on the html example to 'see' its layout.
Notice in the html I had to move the jquery call up to the <head> and change it from 'slim' to a full version - where you get it from is upto you !

Re: Graph upload

Posted: Thu 22 Jul 2021 7:33 pm
by Armond
Where ever you want really - as long as you reference it correctly at the bottom of the calling page.

In my example I've used the default cumx layout (ie. the holding page is in in newmx/) and there is a sub-folder newmx/js/ ???

Just view-source on the html example to 'see' its layout.
Notice in the html I had to move the jquery call up to the <head> and change it from 'slim' to a full version - where you get it from is upto you !
Ok, I got it work now. Thanks for the help. I've missed some code.

Re: Graph upload

Posted: Sat 24 Jul 2021 8:27 am
by Armond
Ok, so I got one issue. The solar doesn't plot, it just says loading. I don't find out why http://ludvikasegel.com/wx/trends_weathergraphs_1.htm.

Is it possible to plot the cloudbase in a graph?

Re: Graph upload

Posted: Sat 24 Jul 2021 9:45 am
by beteljuice
beteljuice error :oops:

approx. line 1083

Code: Select all

            idxs.forEach(function(idx) {
                if (idx in resp) {
                    if (idx === 'UV') {
                        chart.addAxis({
                            id: 'uv',
Should have chart number ...

Code: Select all

            idxs.forEach(function(idx) {
                if (idx in resp) {
                    if (idx === 'UV') {
                        chart8.addAxis({
                            id: 'uv',
.... and no, there is no history of cloudbase height that you can plot.