1 Vote Vote

PHP: gChartPHP - adding visible values to pie charts

Posted by topdog 523 days ago Questions| values gchartphp pichart All

Hi folks,

I'm using the gchart php wrapper from http://code.google.com/p/gchartphp/. This is a question for anyone out there using it.

Can you visibly display the values that make up slices of a pie chart?

<?php
$piChart = new gPieChart();
$piChart->setDimensions(650,300);
$piChart->addDataSet(array_values($type));
$piChart->setLabels(array_keys($type));
$piChart->setColors(array("F26134", "F1F1F1","FFC7A8","E6E6E6","171717"));
$piChart->setTitle("All Tickets by Issue Type");
?>

<img src="<?php print $piChart->getUrl();  ?>" /> 

Is it possible that for each slice it shows this sort of format - "label (15)"

Thanks!

Jonesy

Originally asked by: Jonesy on Stack Overflow

Discuss Bury


Who Voted for this Question