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; } /* сформируем подписи осей графика */ if (isset($_GET['xt'])) $x_title = urldecode($_GET['xt']); $y_title = $SIZE_MEASUREMENTS[$order]; /* создадим рисунок */ $graph = new Graph(600, 210, 'auto'); $graph->SetScale('textint'); $graph->SetMarginColor($graphMarginColor); $graph->img->SetMargin(45,10,10,45); /* описание шкалы X и Y */ if (isset($x_title)) { $graph->xaxis->SetTitle($x_title, 'center'); $graph->xaxis->SetTitleMargin(10); $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); if (isset($xLabel[0])) $graph->xaxis->SetTickLabels($xLabel); } $graph->yaxis->title->Set($y_title); $graph->yaxis->SetTitleMargin(28); $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); /* создадим графики */ 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(); ?>