Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible to set backround color #6

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 1 comment
Open

impossible to set backround color #6

GoogleCodeExporter opened this issue Mar 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant