Gradient per bar or per pie part

TeeChart for PHP
Post Reply
Martin
Newbie
Newbie
Posts: 11
Joined: Tue Nov 13, 2012 12:00 am

Gradient per bar or per pie part

Post by Martin » Fri Dec 14, 2012 4:15 pm

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?

Yeray
Site Admin
Site Admin
Posts: 8587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Gradient per bar or per pie part

Post by Yeray » Wed Dec 19, 2012 1:27 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 8587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Gradient per bar or per pie part

Post by Yeray » Thu Dec 20, 2012 9:34 am

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).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Image Please read our Bug Fixing Policy

Martin
Newbie
Newbie
Posts: 11
Joined: Tue Nov 13, 2012 12:00 am

Re: Gradient per bar or per pie part

Post by Martin » Wed Jan 09, 2013 10:38 am

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!

Yeray
Site Admin
Site Admin
Posts: 8587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Gradient per bar or per pie part

Post by Yeray » Wed Jan 09, 2013 2:54 pm

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);
        }
    }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply