When I have an axis with negative and positive values the axis text values are correct except for the zero (0) value which is some small number like 3.943E-16. How can I make this display the value (0) instead? See image below (I hope the image comes through.
[img]C:\STI%20Documents\Curve%20Trace\Curves%20for%20website\MOSFET\MOSFET%20Negative%20VGS\example.jpg[/img]
TeeChart Axis
Re: TeeChart Axis
Hello Roy,
I have tried to reproduce your problem using next codes, but it works fine:
First test code:
Second test code:
Could you please, tell us which version of TeeChart VCL you can use? On the other hand, Could you try again attach image example.jpg because, I haven't seen this?
Thanks,
I have tried to reproduce your problem using next codes, but it works fine:
First test code:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.AddXY(0,25);
Series1.AddXY(-1,-35);
Series1.AddXY(3,15);
Series1.AddXY(1,-10);
Series1.AddXY(-2,23);
end;
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Axes.Left.LabelsExponent:=True;
Chart1.Axes.Left.AxisValuesFormat:='#.0 "x10" E+0';
Series1.Add(-10e-20);
Series1.Add(-10e-15);
Series1.Add(-10e-10);
Series1.Add(-10e-5);
Series1.Add(0);
Series1.Add(10e-5);
Series1.Add(10e-10);
Series1.Add(10e-15);
Series1.Add(10e-20);
end;
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeeChart Axis
The data points are correct. When I click on the series the data has, for example (-.3, -.2, -.1, 0, .1, .2, .3). The chart is initialized at runtime and then the data is added as the program is run one point at a time. The chart initialization includes the axis minimum (e.g. -.3) and the axis maximum (e.g. .3) and then the chart is displayed before the data points start coming in. The chart text for the axis is, for example ( -.3, -.2, -.1, 3.267e-16, .1, .2, .3). and it this text I would like to change so that the zero point actually has "0" for the text.
Re: TeeChart Axis
I tried to include a JPG image of the chart. Is there any way I can send you the JPG?
Re: TeeChart Axis
I believe I now have the picture attached.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TeeChart Axis
Hi Roy,
You can use OnGetAxisLabel or OnGetNextAxisLabel events to customize labels, for example:
If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here and lets us know the exact TeeChart version you are using.
Thanks in advance.
You can use OnGetAxisLabel or OnGetNextAxisLabel events to customize labels, for example:
Code: Select all
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
if LabelText = '0' then
LabelText := 'my own label text';
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 |
Instructions - How to post in this forum |