[rrd-users] color issue

Tobias Oetiker tobi at oetiker.ch
Fri Aug 14 08:30:31 CEST 2015


Hi Petteri,

there are several valid ways to write this ...

  "-c","CANVAS#000000"

  "--color","CANVAS#000000"

  "--color=CANVAS#000000"

this is not rrdtool specific, but they way argument parsing on unix
works in general ...

cheers
tobi


two ways you can write this:


Yesterday Petteri Matilainen wrote:

> On 13.8.2015 20:43, Martin wrote:
> > Hello could someone tell me why i get this error from the perl script
> > below?
> >
> > ERROR: problem generating the graph: unknown option '--c CANVAS#000000'
> > Done!
> >
> >
> >
> > #!/usr/bin/perl
> >
> > use RRDs;
> >
> > my $cur_time = time();
> > my $start_time = $cur_time - 86400;     # set end time to 24 hours ago
> >
> > RRDs::graph "/var/www/ta/ta_temp.png",
> >                          "--start= $start_time",
> >                          "--end= $cur_time",
> >                          "--title= Temperatur givare på Casa de Padda",
> >                          "--height= 300",
> >                          "--width= 500",
> >                          "--vertical-label= °C",
> >                          "--c CANVAS#000000",
> >                          "--c BACK#000000",
> >                          "--c FONT#FFFFFF",
> > "DEF:TerrariumLeft=/home/pi/rrddata/TA_temp.rrd:TerrarieV:AVERAGE",
> >                          "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
> >                          "HRULE:0#0000FF",
> >                          "LINE2:TerrariumLeft#FFFF00:Terrarium
> > Vänster\t\t",
> >                          "GPRINT:TerrariumLeft:LAST:%6.1lf",
> >                          "GPRINT:TerrariumLeft:AVERAGE:%6.1lf",
> >                          "GPRINT:TerrariumLeft:MAX:%6.1lf",
> >                          "GPRINT:TerrariumLeft:MIN:%6.1lf\\n",
> > "DEF:TerrariumRight=/home/pi/rrddata/TA_temp.rrd:TerrarieH:AVERAGE",
> >                          "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
> >                          "HRULE:0#0000FF",
> >                          "LINE2:TerrariumRight#e65243:Terrarium Höger\t\t",
> >                          "GPRINT:TerrariumRight:LAST:%6.1lf",
> >                          "GPRINT:TerrariumRight:AVERAGE:%6.1lf",
> >                          "GPRINT:TerrariumRight:MAX:%6.1lf",
> >                          "GPRINT:TerrariumRight:MIN:%6.1lf\\n",
> > "DEF:Akvarium=/home/pi/rrddata/TA_temp.rrd:Akvarie:AVERAGE",
> >                          "COMMENT:\t\t\t\t\tNu     Medel    Max Min\\n",
> >                          "HRULE:0#0000FF",
> >                          "AREA:Akvarium#0000FF80:Akvarium\t\t\t",
> >                          "GPRINT:Akvarium:LAST:%6.1lf",
> >                          "GPRINT:Akvarium:AVERAGE:%6.1lf",
> >                          "GPRINT:Akvarium:MAX:%6.1lf",
> >                          "GPRINT:Akvarium:MIN:%6.1lf\\n";
> >
> > my $err=RRDs::error;
> > if ($err) {print "problem generating the graph: $err\n";}
> >
> > print "Done!\n"
> >
> > _______________________________________________
> > rrd-users mailing list
> > rrd-users at lists.oetiker.ch
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
> Hi,
>
> I believe you have to use -c CANVAS#000000, or --color CANVAS#000000. Same
> goes for the other color definitions too.
>
> regards,
>
> PM
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch tobi at oetiker.ch +41 62 775 9902


More information about the rrd-users mailing list