Log problems with bar chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Cyionics
Newbie
Newbie
Posts: 17
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

Log problems with bar chart

Post by Cyionics » Wed Mar 15, 2006 8:50 am

Hi

I have found an issue with log display using bars
we use numbers like 1 e -9, 1 e-10 etc

This display fine in a line or point chart but in a bar chart they are displayed incorrectly in log Y axis if the values are less than 1.

Peter

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

Post by Narcís » Wed Mar 15, 2006 10:08 am

Hi Cyionics,

Can you please drop a TChart and a TButton in a form and test the code below? Does it reproduces the issue you report? I mean, the issue you are reporting is that the left axis is not properly scaled when using a TBarSeries?

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.AddSeries(TBarSeries.Create(self));
  for i:=0 to 10 do Chart1[0].Add(random);

  Chart1.Axes.Left.Logarithmic:=true;
  Chart1[0].ValueFormat:='#.0 "x10" E+0';
end;

procedure TForm1.Button1Click(Sender: TObject);
var tmp: TChartSeries;
begin
  tmp:=Chart1[0];

  if tmp is TBarSeries then ChangeSeriesType(tmp, TLineSeries)
  else ChangeSeriesType(tmp, TBarSeries);
end;
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

Cyionics
Newbie
Newbie
Posts: 17
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

log display in bar

Post by Cyionics » Wed Mar 15, 2006 11:24 am

Hi

Yes that certainly looks like the issue

Peter

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

Post by Narcís » Wed Mar 15, 2006 12:12 pm

Hi Peter,

Thanks for confirming. I've added the issue (TV52011316) to our defect list to be fixed for future releases. In the meantime, you can try solving that problem by manually setting left axis minimum and maximum values using Chart1.Axes.Left.SetMinMax method.
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