TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
xsLiu
- Newbie

- Posts: 30
- Joined: Wed May 22, 2019 12:00 am
Post
by xsLiu » Wed Sep 30, 2020 2:01 am
I hope to show Titles using the same Color with its corresponding Series in a ChartListBox, but Title‘s Color is not consistent with SeriesColor in ChartListBox.
Code: Select all
with aChartListBox do
begin
Chart := aChart;
EnableChangeType := false;
EnableChangeColor := true;
EnableDragSeries := false;
ShowSeriesIcon := false;
ShowActiveCheck := true;
ShowSeriesColor := true;
ShowSeriesTitle := true;
FontSeriesColor := true;
AllowDeleteSeries := false;
AllowAddSeries := false;
end;

- Color.jpg (5.35 KiB) Viewed 2203 times
-
Yeray
- Site Admin

- Posts: 8973
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Wed Sep 30, 2020 9:16 am
Hello,
It seems to work fine for me here:

- Project1_2020-09-30_11-15-02.png (14.41 KiB) Viewed 2195 times
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var Chart1: TChart;
ChartListBox1: TChartListBox;
begin
Chart1:=TChart.Create(Self);
ChartListBox1:=TChartListBox.Create(Self);
with Chart1 do
begin
Parent:=Self;
View3D:=False;
AddSeries(TBarSeries).FillSampleValues;
with TLineSeries(AddSeries(TLineSeries)) do
begin
FillSampleValues;
Pen.Width:=2;
end;
end;
with ChartListBox1 do
begin
Parent:=Self;
Left:=Chart1.Width;
Chart := Chart1;
EnableChangeType := false;
EnableChangeColor := true;
EnableDragSeries := false;
ShowSeriesIcon := false;
ShowActiveCheck := true;
ShowSeriesColor := true;
ShowSeriesTitle := true;
FontSeriesColor := true;
AllowDeleteSeries := false;
AllowAddSeries := false;
end;
end;
If you still find problems with it, please arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
-
xsLiu
- Newbie

- Posts: 30
- Joined: Wed May 22, 2019 12:00 am
Post
by xsLiu » Thu Oct 01, 2020 3:00 am
Please find attached.

- Point3D.jpg (66.09 KiB) Viewed 2187 times
-
Attachments
-
- Point3D.zip
- (54.15 KiB) Downloaded 137 times
-
Yeray
- Site Admin

- Posts: 8973
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Oct 01, 2020 6:30 am
Hello,
You are setting the series LinePen.Color
, which is ok for the lines connecting the 3d points, but you should set the main series' Color
.