Transparent Pie Charts

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Transparent Pie Charts

Post by TestAlways » Fri Dec 14, 2007 4:15 pm

In a chart, I want to be able to give a user the option of showing a series either in red, or transparently--here is a comparison of the two:

Image

vs.

Image

Except for the legend showing that it is white, it works fine.

But they have the option of showing any stacked bar in a pie chart--but how show a transparent pie slice?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 17, 2007 9:52 am

Hi TestAlways,

You can either set a slice's color to clNone when populating a series or changing this color lattter as you can see in the code snippet below.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Series1.ValueColor[0]:=clNone;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.AddPie(5, '', clRed);
  Series1.AddPie(6, '', clBlue);
  Series1.AddPie(7, '', clNone);
  Series1.AddPie(8, '', clGreen);
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply