Page 1 of 1
graphCombined block
Posted: Sun Dec 02, 2018 10:06 am
by meteoesine
Hi there,
I'm looking for who has modified this block with colored lines.
I saw his template some days/weeks ago but now I do not remeber he was and I can't find it anymore.
If you are reading, pls kindly share your interesting modification.
Thanks
Re: graphCombined block
Posted: Mon Jan 28, 2019 2:38 pm
by WSKO_Karlchen
How can i add TS1 to TS4 and SM1 to SM4 to the graphcombined Block?
Tried it by myself - but failed...
A hint from anybody - or maybe a running script?
Tried to add this in data.php
Code: Select all
if(in_array("TS1", $graphsToInclude)){
if($row['TS1'] === "" || $row['TS1'] === null){
$rawData['TS1'][] = null;
}
else{
$rawData['TS1'][] = convertT($row['TS1']);
}
}
and add this
Code: Select all
if($parameter == "TS1"){
$data['datasets'][] = array("name" => lang('soil temperature 1','c'), "data" => $rawData['TS1'], "unit" => unitFormatter($displayTempUnits), "type" => "line", "valueDecimals" => 1);
}
but it wont work

Re: graphCombined block
Posted: Wed Jan 30, 2019 5:31 pm
by lemimi
Hello,
If colored lines in graphCombinedblock still interest you, I just did this:
https://www.lemimi.fr/template/indexDesktop.php
In the graphCombinedBlock.php file,
line 286, I replaced:
color: '# <? php echo $ graphColor?>',
by
lineColor: dataset.lineColor,
In the data.php file,
I added:
, "lineColor" => "#dddddd"
to lines 133,136,139,142,145,148,151,154 and 157
Like this:
$ data ['datasets'] [] = array ("name" => lang ('temperature', 'c'), "data" => $ rawData ['T'], "unit" => unitFormatter ($ displayTempUnits ), "type" => "line", "valueDecimals" => 1, "lineColor" => "#dddddd");
And just change the value of #dddddd to change the color of the line.
The transformed files are downloadable here:
www.lemimi.fr/download/data.zip
www.lemimi.fr/download/graphCombinedBlock.zip
Michel
Re: graphCombined block
Posted: Thu Jan 31, 2019 7:32 am
by meteoesine
good job. well done!
tnx
Re: graphCombined block
Posted: Thu Jan 31, 2019 8:53 am
by Jolumarali
Merci Michel, parfait
José Luis
Re: graphCombined block
Posted: Thu Jan 31, 2019 6:10 pm
by lemimi
Bonsoir José Luis,
Comme beaucoup de français, je ne maitrise pas parfaitement l'anglais et le traducteur de Google m'aide beaucoup.
Aussi lorsque j'ai installé Meteotemplate, je me suis amusé à traduire le setup et le menu en français pour pouvoir m'y retrouver plus facilement.
Et aussi et surtout à sauvegarder au fur et à mesure!
- pour /template/install/setup.php en français:
http://www.lemimi.fr/download/mtotemplate/setup.zip
- pour /template/admin/menu/menuTabs.php en français:
https://www.lemimi.fr/download/mtotemplate/menuTabs.zip
J'ai aussi modifier le fichier /template/lang/fr.php
https://www.lemimi.fr/download/mtotemplate/fr.zip
J'ai mis ' à la place de \\'
72 modifications et cela corrige les problèmes d'affichage de l'apostrophe dans les différents menus.
On a ainsi par exemple:
Qualité de l'air au lieu de Qualité de l\'air
Si cela peut aider certains que l'anglais rebute...
Bonne soirée et au plaisir... Michel
Re: graphCombined block
Posted: Sun Feb 03, 2019 6:15 pm
by Jolumarali
Merci Michel
Idem pour l'anglais , merci Google
Très bon travail.
Mise à jour effectué , en gardant bien les Zip , car si Jachym mets à jour Meteotemplate le setup et menuTbas vont être écrasé,
pour le traducteur, il mettra ta traduction lang. à jour,
et encore bravo
amitiès
José Luis
Re: graphCombined block
Posted: Tue Feb 05, 2019 10:56 am
by andyk1
Hello and thank you!
More than likely what I was looking for also. I have a light color (gray) background and that block came up blended into a light color also and barely readable.
Thanks for your effort.
Andy
Re: graphCombined block
Posted: Tue Feb 05, 2019 1:36 pm
by andyk1
I tried you're modified blocks but as you can see at
www.nicomaparkwx.com at the bottom center the background color is a light color and I need to change the graph and text to a darker shade. Not sure why my MT is doing that as all the other blocks work just right.
Anyway I need to get in there and find the text color and the graph lines and change this block to black.
Thanks again. You put me on the right track.
Andy
Re: graphCombined block
Posted: Tue Feb 05, 2019 2:59 pm
by lemimi
I just put my theme in "LIGHT" like you.
On "/template/admin/createHomepage.php?type=desktop",
I added in the box "Highlighted blocks:" graphCombined

See what this gives right now on:
https://www.lemimi.fr/template/indexDesktop.php
It's a little better. . .
Michel
Re: graphCombined block
Posted: Tue Feb 05, 2019 3:58 pm
by andyk1
I did as you suggested. I left it light the first time and added graphCombined to the highlighted Block but still could not see the graph. Dark of course worked but I do not prefer the dark theme. Silver is what I am looking for. I only need to change the graph text color and outlines. I know the color is in the Main setup php to control the color through out the blocks. I just haven't had time to dig through it to see how there controlled and why this one block refuses to cooperate...
Thanks anyway. I'll leave your suggestion up till you have a chance to look at it before I go digging through the main PHP files.
Andy
Re: graphCombined block
Posted: Tue Feb 05, 2019 5:43 pm
by lemimi
Look here (bottom of page):
https://www.nicomaparkwx.com/wx/indexDesktop.php
I do not know how he did to change the fund but
it seems to me that it is close to what you are looking for.
Michel
Re: graphCombined block
Posted: Tue Feb 05, 2019 7:12 pm
by andyk1
Hello Michel!!!
Yes you are correct but only in a dark theme. When I change it back to light as I've always had it is hard to read. Actually now it is a light blue but I think that is the setting you changed. The graphs are still hard to read is what I need to fix.
Andy
Re: graphCombined block
Posted: Tue Feb 05, 2019 9:03 pm
by WSKO_Karlchen
Is there no solution to add other sensors to this block? Like I mentioned to add soil moisture and temp data?
Re: graphCombined block
Posted: Wed Feb 06, 2019 5:37 am
by andyk1
Good point. maybe a suggestion for the version 18. I don't have one but am sure a script could be written in by someone that has those sensor.