SetScale('textlin'); $graph->SetY2Scale('lin',0); // Add data and labels $data = array(20,30,40,50,60); $labels = array('Jan','Feb','Mar','Apr','May'); $graph->xaxis->SetTickLabels($labels); // Create the bar plot $bplot = new BarPlot($data); $bplot->SetFillColor('#6D85FF'); //Add the bar plot to the graph $graph->Add($bplot); // Set the CSIM target $target = array('http://example.com','http://example.org','http://example.net','http://example.biz','http://example.info'); $csim = new StrokeCSIM(); $csim->SetTarget($target); // set the target URLs $bplot->SetCSIMTargets($csim); // add the image map // Display the chart $graph->Stroke("bar.png"); ?>
SetScale('textlin'); $graph->SetY2Scale('lin',0); // Add data and labels $data = array(20,30,40,50,60); $labels = array('Jan','Feb','Mar','Apr','May'); $graph->xaxis->SetTickLabels($labels); // Create the line plot $lplot = new LinePlot($data); $lplot->SetColor('#6D85FF'); //Add the line plot to the graph $graph->Add($lplot); // Set the CSIM target $target = array('http://example.com','http://example.org','http://example.net','http://example.biz','http://example.info'); $csim = new StrokeCSIM(); $csim->SetTarget($target); // set the target URLs $lplot->SetCSIMTargets($csim); // add the image map // Display the chart $graph->Stroke("line.png"); ?>The package library used in these examples is JpGraph, a PHP-based graphing and charting library.