1024 && $order < 3) { $order++; $max /= 1024; } $div = pow(1024, $order); for ($i = 0; $i < $data_count; $i++) { for ($j = 0; $j < $count; $j++) $data[$i][$j] = isset($data[$i][$j]) ? $data[$i][$j] / $div : 0; } /* подпись оси Y */ $y_title = $SIZE_MEASUREMENTS[$order]; /* подписи данных оси X */ $x_label = array(); if (isset($_GET['xl'])) $x_label = array_map('urldecode', explode('|', $_GET['xl'])); /* создадим рисунок */ $graph = new Graph(350, 210, 'auto'); $graph->SetScale('textint'); $graph->SetMarginColor($graphMarginColor); $graph->img->SetMargin(45,10,10,50); /* описание шкалы X и Y */ if (isset($x_label[0])) { $graph->xaxis->SetTickLabels($x_label); $graph->xaxis->SetLabelAngle(90); $graph->xaxis->SetFont(FF_FONT1, FS_NORMAL); } $graph->yaxis->SetTitleMargin(28); $graph->yaxis->title->Set($y_title); $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); /* создадим графики */ $bar = array(); for ($i = 0; $i < $data_count; $i++) { $bar[$i] = new BarPlot($data[$i]); $bar[$i]->SetFillColor($color[$i]); if (isset($leg[$i])) $bar[$i]->SetLegend($leg[$i]); } $gb = new GroupBarPlot($bar); $graph->Add($gb); /* параметры отображения легенды */ if (isset($leg[0])) { $graph->legend->SetLayout(LEGEND_HOR); $graph->legend->SetPos(0.5, 0.16, "center", "bottom"); $graph->legend->SetFillColor('white@0.7'); $graph->legend->SetShadow(false); } $graph->Stroke(); ?>