Cursor tool in 3d

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Richard
Newbie
Newbie
Posts: 11
Joined: Tue Feb 12, 2013 12:00 am

Cursor tool in 3d

Post by Richard » Fri May 10, 2013 10:16 am

Hi

I am having problems getting the cursor tool to work in 3d. I have a chartgrid showing some data, and on mouse down I want the cursor tool to highlight the point

ie

procedure TForm1.ChartGridMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ChartTool1.Visible:=true;
ChartTool1.XValue:= PCAChartGrid.Series.XValue[PCAChartGrid.row-2];
Charttool1.YValue:=PCAChartGrid.Series.YValue[PCAChartGrid.row-2];
end;

procedure TForm1.ChartGridMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ChartTool1.Visible:=False;
end;

I cant find how to set the z value? it appears to be set somewhere, but it is not related to the point selected

Richard

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Cursor tool in 3d

Post by Yeray » Fri May 10, 2013 1:10 pm

Hi Richard,

I'm not sure about what series type are you using and how would you like the cursor to be drawn.
The following is a 2D chart, but it seems to work fine for me here:

Code: Select all

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  Chart1.AddSeries(TPointSeries).FillSampleValues;

  with Chart1.Tools.Add(TCursorTool) as TCursorTool do
  begin
    Chart1.Draw;
    Visible:=false;
  end;

  ChartGrid1.Chart:=Chart1;
  ChartGrid1.Series:=Chart1[0];
end;

procedure TForm1.ChartGrid1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  with Chart1.Tools[0] as TCursorTool do
  begin
    Visible:=true;
    XValue:=ChartGrid1.Series.XValue[ChartGrid1.row-2];
    YValue:=ChartGrid1.Series.YValue[ChartGrid1.row-2];
  end;
end;

procedure TForm1.ChartGrid1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Chart1.Tools[0].Visible:=False;
end;
Could you please modify the code above so we can get a simple example project we can run as-is to reproduce the problem here?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Richard
Newbie
Newbie
Posts: 11
Joined: Tue Feb 12, 2013 12:00 am

Re: Cursor tool in 3d

Post by Richard » Fri May 10, 2013 4:03 pm

Sorry I should have said, it is on various types of series
TBubble3DSeries
TPoint3DSeries
and TVector3dSeries

You can see the effect on the snap style demo in the teechart 2012

If you try to move the cursor over say the top, back, right point (Light brown for me) - the cursor is not in line with the point because it is well forward of the data point on the depth axis. Toggling the use z button just moves it back slightly NOT to the where the point is in 3D

I hope that makes sense

Richard

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Cursor tool in 3d

Post by Yeray » Mon May 13, 2013 10:27 am

Hi Richard,

Right, the TCursorTool isn't calculating the Z Position when linked to a 3D series, it uses StartZ.
I've implemented it for the next maintenance release (TV52016570).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Richard
Newbie
Newbie
Posts: 11
Joined: Tue Feb 12, 2013 12:00 am

Re: Cursor tool in 3d

Post by Richard » Mon May 20, 2013 10:06 am

Thank - sorry I didn't get back sooner

Any idea when the maintenance release is likely? I know you can't be exact, but a rough idea would help

Thanks again

Richard

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

Re: Cursor tool in 3d

Post by Narcís » Mon May 20, 2013 10:15 am

Hi Richard,

It's imminent. We expect to publish it before the end of the week. Stay tuned!
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

Richard
Newbie
Newbie
Posts: 11
Joined: Tue Feb 12, 2013 12:00 am

Re: Cursor tool in 3d

Post by Richard » Tue May 21, 2013 8:50 am

Great - I will keep lurking here then

R

Post Reply