TIsoSurfaceSeries and XZ plot
TIsoSurfaceSeries and XZ plot
Hi!
I am trying to draw an array of values with the TIsoSurfaceSeries, and I want to display my data in XZ-plane. The problem is that when I set View3D:=false, TeeChart is using XY-plane to display the data. How can I set up 2D views of TIsoSurfaceSeries' objects (TeeChartPro 8.05)?
I am trying to draw an array of values with the TIsoSurfaceSeries, and I want to display my data in XZ-plane. The problem is that when I set View3D:=false, TeeChart is using XY-plane to display the data. How can I set up 2D views of TIsoSurfaceSeries' objects (TeeChartPro 8.05)?
Re: TIsoSurfaceSeries and XZ plot
Hi toxi,
Have you tried using a ColorGrid instead of a Surface in 2D or viewed from the top?
Suface Series viewed from the top:
ColorGrid Series:
If that's not what you are trying to do, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Have you tried using a ColorGrid instead of a Surface in 2D or viewed from the top?
Suface Series viewed from the top:
Code: Select all
uses TeeSurfa;
procedure TForm1.FormCreate(Sender: TObject);
var x, z: integer;
begin
Chart1.Chart3DPercent:=100;
Chart1.Aspect.Orthogonal:=false;
Chart1.Aspect.Zoom:=70;
Chart1.Aspect.Rotation:=0;
Chart1.Aspect.Elevation:=270;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries do
begin
for x:=0 to 9 do
for z:=0 to 9 do
AddXYZ(x, random*10, z);
end;
end;
Code: Select all
uses TeeSurfa;
procedure TForm1.FormCreate(Sender: TObject);
var x, z: integer;
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TColorGridSeries) as TColorGridSeries do
begin
for x:=0 to 9 do
for z:=0 to 9 do
AddXYZ(x, random*10, z);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TIsoSurfaceSeries and XZ plot
Hi toxi,
Thanks in advance.
If you still have problems with it, don't hesitate to let us know.
Could you please try to arrange a simple example project we can run as-is to reproduce the problem here?toxi wrote:1) There is no filled area on the Fig.1. Values Y=YValues.MaxValue (13e-4) are located under no filled area.
Thanks in advance.
You could try doing something similar to the demo at "All features\Welcome !\Axes\Opaque zones" in the feature demo program included in the installation.toxi wrote:2) When I zoom, surface is out of axis (fig. 2).
If you still have problems with it, don't hesitate to let us know.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TIsoSurfaceSeries and XZ plot
Hi Yeray
I uploaded TestIsoSurf.zip. Project compiled with Delphi 6 and TeeChartPro v.8.07.
There are problems in this project:
1) The array of values from Data.xml (program load it when started) is painted not correctly in the TeeChart. But a ChartEditor.Data's table shows perfectly this data when button "3D" is not down. If the ChartEditor.Data's button "3D" is down, table shows the array of data also not correctly. Source_Field.xml contains the field of data, which I am trying to draw using TeeChart
2) There is no filled area with a values=YValues.MaxValue
3) The problem with zoom is disappear in TeeChart 8.07 (Early I used 8.05) , about which I wrote in the previous post. But zoomed area is shifted relatively the left-top point of zoom's rectangle in this version.
I'm sorry, my English is bad.
Please help!
I uploaded TestIsoSurf.zip. Project compiled with Delphi 6 and TeeChartPro v.8.07.
There are problems in this project:
1) The array of values from Data.xml (program load it when started) is painted not correctly in the TeeChart. But a ChartEditor.Data's table shows perfectly this data when button "3D" is not down. If the ChartEditor.Data's button "3D" is down, table shows the array of data also not correctly. Source_Field.xml contains the field of data, which I am trying to draw using TeeChart
2) There is no filled area with a values=YValues.MaxValue
3) The problem with zoom is disappear in TeeChart 8.07 (Early I used 8.05) , about which I wrote in the previous post. But zoomed area is shifted relatively the left-top point of zoom's rectangle in this version.
I'm sorry, my English is bad.
Please help!
Re: TIsoSurfaceSeries and XZ plot
Hi toxi,
We think this could be probably better to be drawn with a Contour or a ColorGrid series. Here is how it looks changing the series to a Contour series:
We think this could be probably better to be drawn with a Contour or a ColorGrid series. Here is how it looks changing the series to a Contour series:
Code: Select all
procedure TFIsoSurf.FormCreate(Sender: TObject);
var tmpSeries: TChartSeries;
begin
{ Chart1.Chart3DPercent:=100;
Chart1.Aspect.Orthogonal:=false;
Chart1.Aspect.Zoom:=70;
Chart1.Aspect.Rotation:=0;
Chart1.Aspect.Elevation:=270;
Chart1.Aspect.Perspective:=0;
}
Chart1.View3D:=False;
Chart1.Legend.Visible:=true;
XMLSource.FileName:=ExtractFileDir(paramstr(0))+'\Data.xml';
XMLSource.Load;
TIsoSurfaceSeries(Chart1.Series[0]).PaletteSteps:=4;
TIsoSurfaceSeries(Chart1.Series[0]).ValueFormat:='00e-0';
tmpSeries:=Chart1[0];
ChangeSeriesType(tmpSeries, TContourSeries);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TIsoSurfaceSeries and XZ plot
Hi Yeray,
There was a mistake on the screenshot from your previuos post: the central area of figure must not be grey colored. Maybe it is a bug with a Palette using. I found what the subfunction CalcFirstLevel of method TIsoSurfaceSeries.DrawCell(x, z: Integer) returns the wrong result - second level in palette. I changed the CalcFistLevel how it looks below. You can see the result on screenshot. It seems that the Controurseries and IsoSurfaceSeries fill correctly.
Filled ContourSeries
There was a mistake on the screenshot from your previuos post: the central area of figure must not be grey colored. Maybe it is a bug with a Palette using. I found what the subfunction CalcFirstLevel of method TIsoSurfaceSeries.DrawCell(x, z: Integer) returns the wrong result - second level in palette. I changed the CalcFistLevel how it looks below. You can see the result on screenshot. It seems that the Controurseries and IsoSurfaceSeries fill correctly.
Code: Select all
TeeSufra.pas
procedure TIsoSurfaceSeries.DrawCell(x, z: Integer);
....
function CalcFirstLevel:Integer;
var i: Array[0..3] of Integer;
t: Integer;
tmpM,
tmpV : TChartValue;
begin
// Search first palette level
i[0]:=ValueIndex0;
i[1]:=ValueIndex1;
i[2]:=ValueIndex2;
i[3]:=ValueIndex3;
tmpMin:=i[0];
tmpV:=v[tmpMin];
tmpM:=tmpV;
tmpMax:=tmpMin;
for t:=1 to 3 do
begin
if v[i[t]]<tmpV then
begin
tmpV:=v[i[t]];
tmpMin:=i[t];
end
else
if v[i[t]]>tmpM then
begin
tmpM:=v[i[t]];
tmpMax:=i[t];
end;
end;
result:=-1;
for t:=0 to PaletteLength-1 do
With Palette[t] do
//if UpToValue>tmpV then
// fix
if UpToValue>=tmpV then
//
begin
result:=t;
break;
end;
end;
Re: TIsoSurfaceSeries and XZ plot
Hi toxi,
I've added your suggestion to the wish list to be studied for future releases (TV52015423).
Anyways, I'm glad to see you've found a way to draw it as you want.
I've added your suggestion to the wish list to be studied for future releases (TV52015423).
Anyways, I'm glad to see you've found a way to draw it as you want.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TIsoSurfaceSeries and XZ plot
Hi toxi,
Thanks for your feedback. Just wanted to let you know that I have included your enhancement suggestion for next TeeChart VCL release.
Thanks for your feedback. Just wanted to let you know that I have included your enhancement suggestion for next TeeChart VCL release.
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 |