Page 1 of 1
Edit and navigate in a Surfaceserie
Posted: Wed Oct 03, 2007 8:46 pm
by 10046306
is there a example or tool for editing and navigate in a Surfaceserie.
The TSurfaceNearestTool selects a cell with 4 points. I want to navigate and edit the separate points with the keyboard.
Is it possible to change the color of the wireframe at the piont where you navigate or edit.
I have a screenshot from this but i don't no how add this to this topic.
Posted: Thu Oct 04, 2007 8:24 am
by narcis
Hi rojo,
This is not exactly available but you can achieve something similar using a TDragPointTool to drag the series points and a TChartGrid for seeing and editing their values as well.
Is it possible to change the color of the wireframe at the piont where you navigate or edit.
This is not possible but you can mark the cell you are one doing something like this:
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if OldIndex <> -1 then
Series1.ValueColor[OldIndex]:=OldColor;
OldIndex:=Series1.Clicked(X,Y);
if OldIndex <> -1 then
begin
OldColor:=Series1.ValueColor[OldIndex];
Series1.ValueColor[OldIndex]:=clRed;
end;
end;
You'll find examples about TDragPointTool at
All Features\Welcome!\Tools\Drag Point in the features demo. Regarding TChartGrid, examples can be found at
All Features\Welcome!\Components\Chart Grid. The demo can be found at TeeChart's program group.
Posted: Fri Oct 05, 2007 11:47 am
by 10046306
Thanks,
wenn i try your example code the cell is marked 1 cell under the place where my mouse is pointing. I changed the code but i can't get the cell high lited under the mouse position.
Posted: Wed Oct 10, 2007 8:19 pm
by 10046306
Hello Narcis,
i made a workaround and add a extra series (point3d) to the chart.
I add the points with AddXYZ but how can i change the Yvalue from a 3d_point. I can't find a instruction to modify this.
For the 2d pointseries i use Chart1.Series[1].YValue[10]:= 24.
is there a instuction like this Chart1.Series[1].XZValue[6,7]:= 3;
Can you please help me.
Regards
RoJo
Posted: Thu Oct 11, 2007 8:18 am
by yeray
Hi rojo,
To change the Y value of the first point of your first series, you should do this Chart1.Series[0].YValue[0] := xx;
And to change the X value of the same point, Chart1.Series[0].XValue[0] := xx;
Posted: Thu Oct 11, 2007 10:57 am
by 10046306
Sorry Yeray but this is not what i asked.
i have one point3d series witch have points that have a XYand Z value.
in my case the Y value is the height of the point. So wenn i want to change the height from a point in the 3D chart the old values are:
X= 6 and Y= 2 and Z= 7
I want to change the height y= 2 to y=3
How can i do that?
RoJo
Posted: Thu Oct 11, 2007 2:30 pm
by narcis
Hi RoJo,
Ok, if you are interested in using rows and columns to obtain a cell in a surface you can do something as in the example I posted
here.
Hope this helps!
Posted: Fri Oct 12, 2007 5:52 am
by 10046306
With the Clicked function i understand that but thats always working with mouse action. In my case i want to change the 3D-points in Runtime with the press on a button or straight out of the programm.
I hope you have a solution for this.
RoJo
Posted: Mon Oct 15, 2007 9:07 am
by yeray
Hi rojo,
If you don't know the order of the point you want to change, you should find it doing something similar to the example NarcĂs pointed to you.
But if you already know the order point, you only have to change its value by Series1.YValue[PointNumber] := xx;
In the following example I have two UpDown Buttons (associated to their respective editboxes), one to navigate through the points and the other to change its Yvalue:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i, j:integer;
begin
Chart1[0].Clear;
for i:=0 to 3 do
begin
for j:=0 to 3 do
begin
Series1.AddXYZ(i,1,j);
end;
end;
UpDown1.Max := Series1.Count-1;
UpDown2.Position := integer (Round(Series1.YValue[UpDown1.Position]));
end;
procedure TForm1.UpDown2Click(Sender: TObject; Button: TUDBtnType);
begin
Series1.YValue[UpDown1.Position] := UpDown2.Position;
end;
procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
UpDown2.Position := integer (Round(Series1.YValue[UpDown1.Position]));
end;
If I understand, you would like to do something similar to that. And note that this is working directly to the surface series, without any Point3d series.
Posted: Mon Oct 15, 2007 7:50 pm
by 10046306
Thanks i'am understanding it now.
Regards
RoJo