[rrd-users] Area in different colors
Erik de Mare
erik at oezie.org
Tue Dec 4 18:19:26 CET 2007
I once made a little perl script for that.
@color =
('00FF00','11FF00','22FF00','33FF00','44FF00','55FF00','66FF00','77FF00','88FF00','99FF00','AAFF00','BBFF00',
'CCFF00','DDFF00','EEFF00','FFFF00','FFEE00','FFDD00','FFCC00','FFBB00','FFAA00','FF9900','FF8800',
'FF7700','FF6600','FF5500','FF4400','FF3300','FF2200','FF1100','FF0000');
$letter = 'a';
for($i=0;$i<@color;$i++){
$control = ($i+1)*($Size/@color);
$fac = $Size/@color;
$value = $i*($Size/@color);
print
"CDEF:$letter=totaal,$control,GE,$fac,totaal,$value,-,0,LE,UNKN,totaal,$value,-,IF,IF\n";
push(@data,"CDEF:$letter=totaal,$control,GE,$fac,totaal,$value,-,0,LE,UNKN,totaal,$value,-,IF,IF");
$letter++;
}
$letter = 'a';
push(@data,"AREA:$letter#$color[0]");
$letter++;
for($i=1;$i<@color;$i++){
print "STACK:$letter#$color[$i]\n";
push(@data,"STACK:$letter#$color[$i]");
$letter++;
}
makes something like this:
http://haas.oezie.org/rrd/haas-day-proces.png
Mvg,
Erik
Simone Felici schreef:
> Alex van den Bogaerdt ha scritto:
>> On Tue, Dec 04, 2007 at 04:18:23PM +0100, Simone Felici wrote:
>>
>>> Hi Alex!
>>>
>>> It's not exactly what I would create.
>>> This creates a graph with different colors, but where the values goes over 60 (in example), it takes the same color from 0 to over 60 and not 4
>>> different colors.
>> This issue comes up every now and then. Several examples are shown
>> on the mailing list, please have a look in the archives.
>>
>> Also see the other response you just got.
>>
> Ok, thank's anyway...
> search form is not the best one, bwt
> thank's to all, I'll look forward myself.
> Bye, Simon
>
More information about the rrd-users
mailing list