SurfaceNearestTool

TeeChart for ActiveX, COM and ASP
Post Reply
LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

SurfaceNearestTool

Post by LAL » Thu Jul 03, 2008 3:37 am

Is there some trick to get this tool to work? I can't get it to show up on my SurfaceSeries.

I notice some other (old) threads reporting problems. Has this tool been fixed since then?

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

Post by Yeray » Thu Jul 03, 2008 8:35 am

Hi LVL,

Could you explain us what is your exact problem so we can reproduce it here? Or, you could also send us a simple example project we can run "as-is" to reproduce the problem here too.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Have you seen the "Surface Nearest" demo at All features/Tools?
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

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Post by LAL » Thu Jul 03, 2008 8:55 pm

Hi Yeray,

Firstly, apologies...since I seem to have started this thread in the wrong forum! I'm actually using the v8 ActiveX control in and MFC application.

I'm populating a 3d surface series with an irregular grid and adding the tool in code. The surface shows up OK, and if I start the editor I can see that the tool has been added and linked to the series. However, it seems no matter what options I choose for the tool it doesn't show up on the surface.

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

Post by Yeray » Fri Jul 04, 2008 8:53 am

Hi LVL,

I've tested the tool as you suggest and it seems to work fine for me here. Could you tell me if I'm missing any important step to reproduce it?

Code: Select all

Private Sub Command1_Click()
  TeeEditor1.ShowEditor
End Sub

Private Sub Form_Load()
Dim x, z As Integer
  TeeCommander1.Chart = TChart1
  TeeEditor1.Chart = TChart1
  
  TChart1.AddSeries scSurface
  TChart1.Series(0).asSurface.IrregularGrid = True
  
  For x = 1 To 10
    For z = 1 To 10
      TChart1.Series(0).asSurface.AddXYZ x, Rnd * 10, z, "", clTeeColor
    Next z
  Next x
  TChart1.Tools.Add tcSurfaceNearest
  TChart1.Tools.Items(0).asSurfaceNearest.Series = TChart1.Series(0)
End Sub
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

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Post by LAL » Tue Jul 08, 2008 4:41 am

Hi Yeray,

Your VB example also works fine for me, but I cannot get the tool to work in VC6...

It just doesn't show up in the colours I choose. Very occasionally if I set all the colours to 'None' the active column 'disappears' as I move the mouse, but it isn't reliable and seems to depend on the orientation of the chart.

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

Post by Narcís » Tue Jul 08, 2008 8:27 am

Hi LVL,

Code snippet below works fine for me here. Could you please check if it works fine at your end and, if necessary, modify it so that we can reproduce the problem here?

Code: Select all

	m_Chart1.AddSeries(scSurface);
	m_Chart1.Series(0).FillSampleValues(50);

	m_Chart1.GetTools().Add(tcSurfaceNearest);

	VARIANT TheSeries;
	TheSeries.vt=VT_I2;
	TheSeries.intVal=0; 

	m_Chart1.GetTools().GetItems(0).GetAsSurfaceNearest().SetSeries(TheSeries);
	m_Chart1.GetTools().GetItems(0).GetAsSurfaceNearest().SetColumnColor(RGB(255,0,0));
	m_Chart1.GetTools().GetItems(0).GetAsSurfaceNearest().SetRowColor(RGB(0,0,255));
	m_Chart1.GetTools().GetItems(0).GetAsSurfaceNearest().SetCellColor(RGB(0,255,0));
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

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Post by LAL » Wed Jul 09, 2008 2:23 am

Hi Narcis,

That code works well, and I also discovered the problem. The SurfaceNearest tool disappears if you turn on SmoothPalette...you can even see this effect in the demo program.

Anyway, I found that the NearestPoint tool better suits my needs, so I'm using that.

Thanks for the help.

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

Post by Narcís » Wed Jul 09, 2008 8:28 am

Hi LVL,

Thanks for reporting. I could reproduce the issue here and added it (TV52013200) to our defect list to be fixed for next releases.
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

Post Reply