Coloration haut du graph

Une question, un bug ?
Répondre
Didier
Membre
Messages : 192
Inscription : jeu. avr. 27, 2006 7:01 pm
Localisation : LAUSANNE
Contact :

Message par Didier »

J'ai essayé, vainement, de colorier la partie supérieure de mon graphique ci-dessous mais je n'ai pas trouvé la commande adéquate. Quelqu'un saurait-il comment faire ?

Code:
<?xml version="1.0" encoding="iso-8859-1" ?>
<stylesheet>
<image width="580" height="200" />
<!-- ================= First Lineplot ================= -->
<lineplot width="580" height="200" shadow="5" position-x="0" position-y="0" margin-top="15" margin-right="35" margin-bottom="45" margin-left="65">

<border cornerradius="40" color="FF909090" thick="1" />
<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0" titleside="32">
<title text="" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0" />
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0" />
</labels>
<ticks majorticks="10" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</xaxis>
<y1axis color="FF000000" grid="1" autoscale="1" min="0" max="0" titleside="2" titlemargin="40">
<title text="Hauteur estimée des nuages" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0" />
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0" />
</labels>
<ticks majorticks="5" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</y1axis>

<background color="FFFFFFFF" texture="tex_bluegrad.png" stretch="1" />
<graphbackground color="FFFFFFFF" />
<data>
<cloud_base axisbind="y1axis" color1="40FF0000" color2="200000FF" antialiasing="1" filled="1" hide="0" thick="0" hidelegend="1"/>
</data>
</lineplot>

</stylesheet>


Un tout grand merci pour votre aide.
Davis Vantage Pro 2 + avec ventilation forcée diurne / WeatherlinkIP 6.0.2 / GW Ver. 2.0290b / Windows 7 Pro 64 bits / MiniPC ZOTAC ZBOX ID41 PLUS 4Gb Ram 320Gb disque dur 2,5". http://www.meteolausanne.com
Avatar de l’utilisateur
jturlier
Membre
Messages : 3149
Inscription : mar. août 22, 2006 8:38 am
Localisation : 34410 Sérignan - Languedoc
Contact :

Message par jturlier »

Didier,
la transparence c'est sur les 2 premiers caractères à FF pas sur les 2 derniers

Ce qui suit est ce que j'ai compris que tu voulais.

Confirme STP.

Il y a une ano, à toi d'essayer de la corriger !

Bonne réception

Jean


<?xml version="1.0" encoding="iso-8859-1"?>
<stylesheet>
<image width="580" height="200"/><!-- ================= First Lineplot ================= --><lineplot width="580" height="200" shadow="5" position-x="0" position-y="0" margin-top="15" margin-right="35" margin-bottom="45" margin-left="65">
<border cornerradius="40" color="FF909090" thick="1"/>
<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0" titleside="32">
<title text="" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="10" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</xaxis>
<y1axis color="FF000000" grid="1" autoscale="1" min="0" max="0" titleside="2" titlemargin="40">
<title text="Hauteur estimée des nuages" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="5" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</y1axis>
<data>
<cloud_base axisbind="y1axis" color1="FFFF0000" color2="FFFF00FF" antialiasing="1" filled="1" hide="0" thick="0" hidelegend="1"/>
</data>
<background color="00220000" stretch="1"/>
<graphbackground color="FF00FFFF"/>
</lineplot>
</stylesheet>
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"
Didier
Membre
Messages : 192
Inscription : jeu. avr. 27, 2006 7:01 pm
Localisation : LAUSANNE
Contact :

Message par Didier »

Ce que je désire est ceci :

<?xml version="1.0" encoding="iso-8859-1"?>
<stylesheet>
<image width="580" height="200"/><!-- ================= First Lineplot ================= --><lineplot width="580" height="200" shadow="5" position-x="0" position-y="0" margin-top="15" margin-right="35" margin-bottom="45" margin-left="65">
<border cornerradius="40" color="FF909090" thick="1"/>
<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0" titleside="32">
<title text="" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="10" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</xaxis>
<y1axis color="FF000000" grid="1" autoscale="1" min="0" max="0" titleside="2" titlemargin="40">
<title text="Hauteur estimée des nuages" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="5" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</y1axis>
<data>
<cloud_base axisbind="y1axis" color1="FFFFFFFF" color2="FFFFFFFF" antialiasing="1" filled="1" hide="0" thick="0" hidelegend="1"/>
</data>
<background color="FFFFFFFF" texture="tex_bluegrad.png" stretch="1"/>
<graphbackground color="FF00FFFF"/>
</lineplot>
</stylesheet>

Mais la partie blanche dessous avec la grille en horizontale. J'ai tout essayé mais en vain...... C'est pas facile ce xml..

Et je n'ai pas trouvé la solution pour donner un dégradé à la partie colorée du haut.
Davis Vantage Pro 2 + avec ventilation forcée diurne / WeatherlinkIP 6.0.2 / GW Ver. 2.0290b / Windows 7 Pro 64 bits / MiniPC ZOTAC ZBOX ID41 PLUS 4Gb Ram 320Gb disque dur 2,5". http://www.meteolausanne.com
Avatar de l’utilisateur
TiToine
Site Admin
Messages : 3356
Inscription : lun. mars 20, 2006 11:16 am
Localisation : Montréal
Contact :

Message par TiToine »

On peut donner un dégradé dans la partie du haut seulement en indiquant une texture qui a un dégradé (et non pas simplement en indiquant deux couleurs).
Il faut mettre :

<graphbackground texture="tex_greengrad.png" stretch="1"/>

Là tu auras la texture verte dégradée qui sera incrustée derrière le graph. Ca aurait pu aussi être une photo :)

Par contre pour les lignes horizontales qui n'apparaissent pas ca doit etre un bug que je corrige de ce pas.
Un moyen de contourner ce bug c'est d'ajouter un peu de transparence sur cloud_base (on les verras en dessous).

Au final ca donne ca, j'ai ajouté un ligne cloud_base pour bien délimité le blanc et le blanc du gradient vert.
Tu peux te faire tes propres gradient en .png ou .jpg, ou mettre une photo d'un paysage :D

<?xml version="1.0" encoding="iso-8859-1"?>
<stylesheet>
<image width="585" height="205"/>
<!-- ================= First Lineplot ================= -->
<lineplot width="580" height="200" shadow="5" position-x="0" position-y="0" margin-top="15" margin-right="35" margin-bottom="45" margin-left="65">
<border cornerradius="40" color="FF909090" thick="1"/>
<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0" titleside="32">
<title text="" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="10" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</xaxis>
<y1axis color="FF000000" grid="1" autoscale="1" min="0" max="0" titleside="2" titlemargin="40">
<title text="Hauteur estimée des nuages" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</title>
<labels labelinterval="1" angle="0" formatstring="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="0"/>
</labels>
<ticks majorticks="5" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0"/>
</y1axis>
<data>
<cloud_base axisbind="y1axis" color1="30000000" antialiasing="1" filled="0" hide="0" thick="1.2" hidelegend="1"/>
<cloud_base axisbind="y1axis" color1="80FFFFFF" color2="80FFFFFF" antialiasing="1" filled="1" hide="0" thick="0" hidelegend="1"/>
</data>
<background color="FFFFFFFF" texture="tex_bluegrad.png" stretch="1"/>
<graphbackground texture="tex_greengrad.png" stretch="1"/>
</lineplot>
</stylesheet>
Répondre