... with Data::Dumper i see ...foreach my $row (@sensor_h) { push(@draw, {draw => { file => "../data/$row", legend => "Source 1", + thickness => 2, color => '00FF00' }}); }
and now my problem / ask ...$VAR1 = { 'draw' => { 'thickness' => 2, 'color' => '00FF00', 'legend' => 'Source 1', 'file' => '../data/4C0008008E4F7E10' } }; $VAR2 = { 'draw' => { 'thickness' => 2, 'color' => '00FF00', 'legend' => 'Source 1', 'file' => '../data/DE0008008E479910' } }; $VAR3 = { 'draw' => { 'thickness' => 2, 'color' => '00FF00', 'legend' => 'Source 1', 'file' => '../data/AB0008008E533410' } };
also, i need dinamic numbers of draw ( see on top). the error ...$rrd->graph( #image => '-', image => "../images/" . $sensor . ".png", vertical_label => 'Sensors', width => $width, height => $height, start => time() - $period, draw => { file => "../data/sensor1.rrd", legend => "Source + 1", thickness => 2, color => '00FF00' }, @draw );
How can i make then thats work ? Thanks a lot'Odd number of elements in hash assignment at /usr/lib/perl5/site_perl +/5.8.8/RRDTool/OO.pm line 178. Illegal parameter 'HASH(0xf6cf030)' in graph() at graph.cgi line ...
In reply to help with rrdtool::oo and dinamic draw by guacamayo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |