Problem with displaying values from 1E-7 to 1?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Problem with displaying values from 1E-7 to 1?

Post by HMI » Fri May 18, 2007 9:34 am

Hi there,

I have this Codesegment which is making my head spin:

Code: Select all

  for l_i := 0 to l_grid.GetRowCount - 1 do
  begin
    for l_j := 0 to l_grid.GetColumnCount - 1 do
    begin
      l_gridPoint := l_grid.GetGridPoint(l_i,l_j);
      if l_gridPoint <> Nil then
      begin
        c_dataSurfSerie.AddXYZ(l_gridPoint.GetPosition.Left,l_gridPoint.LocalPotential, l_gridPoint.GetPosition.Top)
      end
      else
        c_dataSurfSerie.AddXYZ(l_i,0,l_j);
    end;
  end;
  Axes.Depth.Visible := true;
  Axes.Depth.Logarithmic := true;
  Axes.Depth.Automatic := true;
  Axes.Bottom.Automatic := true;
  Axes.Bottom.Logarithmic := true;
http://img521.imageshack.us/img521/6902/wertehu2.png
Here are the values (cut off at the bottom).
x = getposition.left
z = getposition.top
y = localpotential


The Problem is, the surface is not displayed... The Axes are scaled the right way (although the format is not right yet).

I tried this code with exchanging:
getposition.left <-> l_i
getposition.top <-> l_j

There I had a result, so its no problem with the localPotential

thanks in advance,
HMI

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

Post by Narcís » Fri May 18, 2007 10:30 am

Hi HMI,
I tried this code with exchanging:
getposition.left <-> l_i
getposition.top <-> l_j

There I had a result, so its no problem with the localPotential
I'd say the problem is with X and Z coordinates. Have you tried using the line below? Does the quote above mean you got the chart you expected using this?

Code: Select all

        c_dataSurfSerie.AddXYZ(l_i,l_gridPoint.LocalPotential, l_j) 
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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Fri May 18, 2007 11:00 am

Yes, this line I tried. It works, for displaying issue. But l_i and l_j are not
the values I want to display.

Ok, more details:
I have a grid of Points with l_i rows and l_j columns.
Every gridpoint has a distance from the Top and the Left (in cm)
and its localPotential.


first I thought there would be double values for one gridpoint like

x=1, y=1, z=5
x=1, y=1, z=4

so that TChart has some problems with this, but there is nothing double.

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

Post by Narcís » Fri May 18, 2007 11:03 am

Hi HMI,

Ok, then it's most likely that you are nout using surface series properly. You may need to use IrregularGrid=true. Please read this thread where I explained how to use that kind of series.

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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Fri May 18, 2007 11:17 am

Ahhh... Yes that's what was missing:D Thank you.
I did not find nothing about this issue in the Help-files.
Maybe you could add it to the TSurfaceSeries Helppage
or somewhere more generell.

Or am I to blind to find it?

Kind regards,
HMI

p.s.: no answer needed, just a rethoric question;)

Post Reply