Hi,
Is it possible to have a different gradient color for different slices?
For example: a pie chart with 3 slices:
slice 1: 30% red gradient,
slice 2: 50% green gradient,
slice 3: 20% orange gradient
also, is this possible with donuts?
another solution might be to have a third dimension for each slice.
Different gradient colors for different slices
Hi Tom,
I'm afraid that it wouldn't be easy to define custom gradients for each slice. But it would be easy if you could start with a shared color, white for example:
I'm afraid that it wouldn't be easy to define custom gradients for each slice. But it would be easy if you could start with a shared color, white for example:
Code: Select all
uses Series, TeCanvas;
var pie1: TPieSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
pie1 := TPieSeries.Create(nil);
Chart1.AddSeries(pie1);
pie1.Add(30,'',clRed);
pie1.Add(50,'',clGreen);
pie1.Add(20,'',RGB(255,128,64));
pie1.Gradient.Visible := true;
pie1.Gradient.StartColor := clWhite;
pie1.Gradient.Balance := 100;
pie1.Gradient.Direction := gdFromBottomLeft;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |