1024 && $order < 3) { $order++; $max /= 1024; } $div = pow(1024, $order); for ($i = 0; $i < $count; $i++) $data[$i] /= $div; /* сформируем подписи осей графика */ 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,20,45); /* заголовок */ if (isset($title)) { $graph->title->Set($title); $graph->title->SetFont(FF_FONT1, FS_BOLD); } /* описание шкалы X и Y */ if (isset($x_title)) { $graph->xaxis->SetTitle($x_title, 'center'); $graph->xaxis->SetTitleMargin(10); $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); } $graph->yaxis->SetTitleMargin(28); $graph->yaxis->title->Set($y_title); $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); /* график */ $bar = new BarPlot($data); $bar->SetFillColor('blue'); $graph->Add($bar); $graph->Stroke(); ?>