Page 1 of 1

Gradient per bar or per pie part

Posted: Fri Dec 14, 2012 4:15 pm
by 15964102
Is it possible to get a different gradient on every bar or pie part?
Now it does 1 gradient for all the bars or pie parts within the chart.

And if it is possible, how do I do it?

Re: Gradient per bar or per pie part

Posted: Wed Dec 19, 2012 1:27 pm
by yeray
Hi Martin,

I've fixed the problem with the Bar series and the gradient. This will be available with the next maintenance release.
We are currently investigating the problem with the Pie.

Re: Gradient per bar or per pie part

Posted: Thu Dec 20, 2012 9:34 am
by yeray
Hi again Martin,

The problem with the gradients in the Pie is more complex. It's actually that no polygon is being drawn with Gradients.
I've added it to the wish list to be further investigated (TF90016462).

Re: Gradient per bar or per pie part

Posted: Wed Jan 09, 2013 10:38 am
by 15964102
Hi Yeray,

Can you tell me when that release is?
Or can you tell me what you have changed?
Then I can finish the project that I am working on.

Thanks a lot!

Re: Gradient per bar or per pie part

Posted: Wed Jan 09, 2013 2:54 pm
by yeray
Hi Martin,

The Pie Gradients (TF90016462) haven't been fixed yet and I'm afraid I can't tell you a date for the Gradients for the polygons will be implemented, allowing this.

The fix for the Bar Gradients is enough simple to publish it here so you can apply it in your Chart.php.
Look for the setBrushCanvas function, and change it for this:

Code: Select all

    public function setBrushCanvas($aColor, $aBrush, $aBackColor) {
        $this->graphics3D->setBrush($aBrush);
        if ($aBrush->getGradientVisible()) {
            $this->graphics3D->getBrush()->getGradient()->setStartColor($aColor);
        }
        else {
            $this->graphics3D->getBrush()->setColor($aColor);
        }
    }