SetMargin(80,30,50,40); $graph->SetMarginColor('white'); $graph->SetScale('dateint'); $graph->title->Set('Current Bids'); $graph->title->SetFont(FF_ARIAL,FS_BOLD,12); $graph->subtitle->Set('(Updated every 5 minutes)'); $graph->subtitle->SetFont(FF_ARIAL,FS_ITALIC,10); // Enable antialias $graph->img->SetAntiAliasing(); // Setup the y-axis to show currency values $graph->yaxis->SetLabelFormatCallback('number_format'); $graph->yaxis->SetLabelFormat('$%s'); //Use hour:minute format for the labels $graph->xaxis->scale->SetDateFormat('H:i'); // Force labels to only be displayed every 5 minutes $graph->xaxis->scale->ticks->Set(INTERVAL); // Adjust the start time for an "even" 5 minute, i.e. 5,10,15,20,25, ... $graph->xaxis->scale->SetTimeAlign(MINADJ_5); // Create the plots using the dummy data created at the beginning $line = array(); for( $i=0; $i < $m; ++$i ) { $line[$i] = new LinePlot($bids[$i],$times); $line[$i]->mark->SetType(MARK_SQUARE); } $graph->Add($line); // Send the graph back to the client $graph->Stroke(); ?>