Title‘s Colors in ChartListBox

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
xsLiu
Newbie
Newbie
Posts: 29
Joined: Wed May 22, 2019 12:00 am

Title‘s Colors in ChartListBox

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
Color.jpg (5.35 KiB) Viewed 1669 times

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

Re: Title‘s Colors in ChartListBox

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
Project1_2020-09-30_11-15-02.png (14.41 KiB) Viewed 1661 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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

xsLiu
Newbie
Newbie
Posts: 29
Joined: Wed May 22, 2019 12:00 am

Re: Title‘s Colors in ChartListBox

Post by xsLiu » Thu Oct 01, 2020 3:00 am

Please find attached.
Point3D.jpg
Point3D.jpg (66.09 KiB) Viewed 1653 times
Attachments
Point3D.zip
(54.15 KiB) Downloaded 105 times

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

Re: Title‘s Colors in ChartListBox

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

Post Reply