-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I'm trying to get a pie chart with all background gray.
This is the code I'm using:
$chart = new PieChart();
$chart->getPlot()->getPalette()->setBackgroundColor(array(
new Color(50, 50, 50),
new Color(50, 50, 50),
new Color(50, 50, 50),
new Color(50, 50, 50),
));
$chart->getPlot()->setLogoFileName('');
$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("A" (0 MB)", 0));
$dataSet->addPoint(new Point("B" (1874 MB)", 1074));
$dataSet->addPoint(new Point("C" (1 MB)", 1));
$chart->setDataSet($dataSet);
$chart->setTitle("Foo");
$chart->render('/tmp/foo.png');
The result is a pie with gray background only around the pie itself, but white
for the rest of image.
Libchart version: 1.3
PHP: 5.4.6
OS: Ubuntu 12.10
Original issue reported on code.google.com by garakkio on 13 Mar 2013 at 10:36