TFactsTheme observation

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PvdE
Newbie
Newbie
Posts: 13
Joined: Tue Aug 16, 2005 4:00 am
Location: Washington, DC

TFactsTheme observation

Post by PvdE » Sat Sep 10, 2005 6:53 pm

When I apply TFactsTheme I notice that line charts disappear. Looking at the code for Apply, I see that this is happening but wonder why this is done. Is this a bug or is this done for a reason I do not understand??

--Paul

Code: Select all

    for t:=0 to SeriesCount-1 do
    with Series[t] do
    begin
      Pen.Visible:=False;

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 Sep 12, 2005 8:28 am

Hi Paul,

I'm not able to reproduce this problem here. Would you be so kind to tell us the specific steps or send us an example we can run "as-is" to reproduce the problem here?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Thanks in advance.
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

PvdE
Newbie
Newbie
Posts: 13
Joined: Tue Aug 16, 2005 4:00 am
Location: Washington, DC

Post by PvdE » Mon Sep 12, 2005 8:58 pm

Narcis,

Pointing to the source code it looked obvious to me that this was happening, but seeing is believeing:

--Paul

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
   LS: TLineSeries;
begin
Chart1.View3D := false;
LS := TLineSeries.Create(Chart1);
LS.Pen.Width := 2;
LS.FillSampleValues(6);
Chart1.AddSeries(LS);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
ApplyChartTheme(TFactsTheme, Chart1);
end;

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

Post by Narcís » Tue Sep 13, 2005 8:52 am

Hi Paul,

Sorry but I read your message too quick and didn't realise you were speaking about source code. I've been able to reproduce the problem and we already have a fix for it.

If you want I can send you our latest sources (to your contact e-mail address) or I can also suggest you a quick and "dirty" solution, while you wait for next maintenance release, which would be adding an if statement to the TFactsTheme.Apply were the Pen.Visible:=false happens:

Code: Select all

    for t:=0 to SeriesCount-1 do
    begin
      if (Series[t] is TBarSeries) then	 
      	Pen.Visible:=TSeriesAccess(Series[t]).IMandatoryPen;
However, this is not much recomandable as introduces a dependency to the Series unit.
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