Page 1 of 1
Humidity graph?
Posted: Mon 27 Feb 2023 4:43 pm
by Texsky
I've spent a fair bit of time tweaking MX(mostly colors and fonts) and have generally been successful (despite not knowing what I'm doing). However, the one adjustment that has me stumped is the color selection of the Humidity graph on the Recent charts list. No matter what I do, I can't find anywhere in all of the Cumulus directory files that holds those color values. I've tried changing charts.js the same way I did for other weather variables but for some reason, this one just won't cooperate. I can see the color rgb's using the Inspect feature of Chrome, but it doesn't point to any place where changes can be made. If someone has the solution that isn't overly difficult to implement, I would appreciate it.
Thanks.
Re: Humidity graph?
Posted: Mon 27 Feb 2023 4:57 pm
by Mapantz
Probably grid.js from the highcharts CDN?!
Re: Humidity graph?
Posted: Mon 27 Feb 2023 7:09 pm
by Texsky
thanks for the reply, but I had tried that earlier and it didn't work. I don't believe it's the right file.
Re: Humidity graph?
Posted: Tue 28 Feb 2023 12:01 am
by flort
I assume you are talking about your web page and not the interface. If so, you should be able to achieve this by editing cumuluscharts.js.
Find the code for the doHum variable. Towards the bottom of the code you will find the ajax call (line starts with $.ajax). You will see the following in this section -
Code: Select all
var titles = {
'hum' : 'Outdoor Humidity',
'inhum': 'Indoor Humidity'
}
Below that insert -
Code: Select all
var colours = {
'hum' : 'rgb(255,165,0)',
'inhum' : 'rgb(128,128,128)'
};
A few lines further down you will see -
Code: Select all
chart.addSeries({
name: titles[idx],
Below that insert -
You should then be able to control your colours by adjustings the rgb values.
Regards,
Trevor
Re: Humidity graph?
Posted: Tue 28 Feb 2023 3:09 am
by Texsky
That did the trick. Thanks so much.
God Bless.