0

In tchart I can set colors for all values of my piechart series except for the automatic generated otherslice. There is an "otherslice" property for the series but it has no color property. I tried setting all color properties available like seriescolor. The thing stays ugly green.

Edit: I'm now editing the same project on my laptop and where the otherslice on my home computer is that bright pain in the eyes green on my laptop it is olive green, so something must be able to influence the color. I've also tried to change all mentiones of color in the dfm form file as text with no result.

1 Answers1

1

This is possible with the OtherSlice.Color property:

  Series1.AddPie(15, '', clRed);
  Series1.AddPie(7, '', clYellow);
  Series1.AddPie(9, '', clGreen);
  Series1.AddPie(11, '', clWhite);
  Series1.AddPie(5, '', clBlack);
  Series1.AddPie(3, '', clPurple);

  Series1.OtherSlice.Style:=poBelowValue;
  Series1.OtherSlice.Value:=6;
  Series1.OtherSlice.Color:=clBlue;

Probably colors changed within different computers because of the default palette. Current default palette is Opera while your desktop may still have the old default palette set. You can change this right-clicking on a chart, going to Options -> New Chart.

Narcís Calvet
  • 7,304
  • 5
  • 27
  • 47
  • Well it might be because of the version i have (that came with delphi turbo 2006) but the color property of the otherslice absolutely does not exist so your line will not compile. – user2774133 Sep 13 '13 at 11:33
  • @user2774133 it might not be possible with your version then. My code works fine with latest TeeChart 2013 VCL/FMX release. – Narcís Calvet Sep 13 '13 at 11:51