--- a/chart2.php +++ b/chart2.php @@ -33,6 +33,7 @@ $fields = array( 'period' => array(T_ZBX_INT, O_OPT, P_NZERO, BETWEEN(ZBX_MIN_PERIOD, ZBX_MAX_PERIOD), null), 'stime' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'border' => array(T_ZBX_INT, O_OPT, P_NZERO, IN('0,1'), null), + 'legend' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'width' => array(T_ZBX_INT, O_OPT, P_NZERO, '{}>0', null), 'height' => array(T_ZBX_INT, O_OPT, P_NZERO, '{}>0', null) ); @@ -100,7 +101,7 @@ if ($height <= 0) { $height = $db_data['height']; } -$graph->showLegend($db_data['show_legend']); +$graph->showLegend(get_request('legend', $db_data['show_legend'])); $graph->showWorkPeriod($db_data['show_work_period']); $graph->showTriggers($db_data['show_triggers']); $graph->setWidth($width);