Hello,
I have a few graphs, with AREA, LINE1 and HRULE displayed.
However on the preview graphs, only AREA and LINE1 are displayed, not the HRULE line!
Is there a way to change this?
Thanks for your help.
How to display HRULE lines in preview graphs
Moderators: Developers, Moderators
I commented out the following lines:
case 'HRULE':
$text_format[$i] = ereg_replace (":", "\:" ,$text_format[$i]); /* escape colons */
// if ($graph_data_array["graph_nolegend"] == true) {
// $value_format[$i] = "0";
// }else{
$value_format[$i] = ereg_replace (":", "\:" ,$value_format[$i]); /* escape colons */
// }
$graph_items .= mysql_result($sql_id_item, $i, "tname") . ":" .
$value_format[$i] . "#" . mysql_result($sql_id_item, $i, "hex") . ":\"" .
"$text_format[$i]$hardreturn[$i]\" ";
break;
But now the graph is not displayed at all and I get the following error in Apache error_log: "ERROR: can't parse '#F51D30:'" where #F51D30 is the color of my HRULE line...
Any idea?
Thanks.
case 'HRULE':
$text_format[$i] = ereg_replace (":", "\:" ,$text_format[$i]); /* escape colons */
// if ($graph_data_array["graph_nolegend"] == true) {
// $value_format[$i] = "0";
// }else{
$value_format[$i] = ereg_replace (":", "\:" ,$value_format[$i]); /* escape colons */
// }
$graph_items .= mysql_result($sql_id_item, $i, "tname") . ":" .
$value_format[$i] . "#" . mysql_result($sql_id_item, $i, "hex") . ":\"" .
"$text_format[$i]$hardreturn[$i]\" ";
break;
But now the graph is not displayed at all and I get the following error in Apache error_log: "ERROR: can't parse '#F51D30:'" where #F51D30 is the color of my HRULE line...
Any idea?
Thanks.
I decided to test this on an installation of cacti. It works fine for me in both preview mode and non-preview mode. Here is an example:
http://www.bigspring.k12.pa.us/cacti/gr ... &rraid=all
Make sure you enter values for VRULE in the 'Value' field in the format 'HH:MM'. In this case I entered 0:00 and the graph renders fine in all cases.
Perhaps something else is up.
-Ian
http://www.bigspring.k12.pa.us/cacti/gr ... &rraid=all
Make sure you enter values for VRULE in the 'Value' field in the format 'HH:MM'. In this case I entered 0:00 and the graph renders fine in all cases.
Perhaps something else is up.
-Ian
Re: How to display HRULE lines in preview graphs
Hi!fdessart wrote:Hello,
I have a few graphs, with AREA, LINE1 and HRULE displayed.
However on the preview graphs, only AREA and LINE1 are displayed, not the HRULE line!
Is there a way to change this?
Thanks for your help.
I modified line 876 in include/rrd_functions.php from
$value_format[$i] = "0";
to
$value_format[$i] = mysql_result($sql_id_item, $i, "value") ;
and it seems to work fine for me.
Maybe this is not the best solution.
regards
Tamas
Who is online
Users browsing this forum: No registered users and 3 guests