Small values don't show up

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Brent
Newbie
Newbie
Posts: 2
Joined: Fri Oct 28, 2005 4:00 am

Small values don't show up

Post by Brent » Fri Feb 09, 2007 7:59 pm

I've been working in an application field where values can vary from 10^20 to 10^-20 as well as negative and I encounter varying problems (automatic scaling and labeling on the axes, too many or not enough Ticks). I recently upgraded to 7.07 in hopes of resolving the issues. Because of reading a forum post

http://www.teechart.net/support/viewtop ... ht=numbers
and
http://www.teechart.net/support/viewtop ... ht=numbers

As of right now there are no ticks, labels or a visible line for a series which ranges in LeftAxis values of 1e-13 to 6e-13.
Brent Cramer
AgilOptics.com

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 Feb 12, 2007 9:50 am

Hi Brent,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments or at our upload page.

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

Brent
Newbie
Newbie
Posts: 2
Joined: Fri Oct 28, 2005 4:00 am

Post by Brent » Mon Feb 12, 2007 6:24 pm

I've put up 2 versions. My default setup is much closer to the second version. But it becomes problematic when values start getting too much smaller than 1e-11 which seems to be some sort of limit on the maximum value.
Brent Cramer
AgilOptics.com

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

Post by Narcís » Thu Feb 15, 2007 8:35 am

Hi Brent,

Thanks for your examples.

The internal limit for axis range is set to 1e-10 and minimum allowed axis increment is limited by 1.0e-11.

To change those limits you should have TeeChart source code, modify them in TeEngine.pas and recompile TeeChart packages.

Another option is that you customize your axes labels using the OnGetAxisLabels event or using custom labels as shown in the All Features\Welcome!\Axes\Labels\Custom Labels example at the features demo. You'll find the features demo at TeeChart's program group.

Also, a trick would be setting axes lables style to talMark having assigned marks style to talValue, if you don't want to display marks. The code would be something like this

Code: Select all

__fastcall TForm1::TForm1(TComponent* Owner): TForm(Owner)
{
  Series1->ValueFormat="0.00e+00";
  Chart1->Axes->Left->AxisValuesFormat = "0.00e+00"; 

  for(int i=0;i<25;i++)
            Series1->AddXY(i,i*pow(10,-13),AnsiString(i),clRed);
 
  Series1->Marks->Style=smsValue;
  Series1->Marks->Visible=False;
  Chart1->Axes->Left->LabelStyle = talMark;
  Chart1->Axes->Left->LabelsSize = 40;
}
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