Don't display data when zooming

TeeChart for ActiveX, COM and ASP
Post Reply
Tuan Nguyen
Newbie
Newbie
Posts: 23
Joined: Fri Feb 23, 2007 12:00 am

Don't display data when zooming

Post by Tuan Nguyen » Thu Apr 17, 2008 6:52 am

Data don't display when i zoom chart. Please reproduce as below step:
+ Use TeeChart 7.0.1.4
+ Add [Line] series into TeeChart
+ Add 3 point data:
+ Point 1: X= 1.08; Y= 2.08
+ Point 2: X= -1.38; Y= -2.38
+ Point 3: X= 1.64; Y= 2.64
+ Zoom data at point #2
=> TeeChart don't display the point.
Please give us some solution about the problem

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

Post by Yeray » Thu Apr 17, 2008 8:26 am

Hi Tuan,

We tried different ways to zoom to the point [-1.38, -2.38] and all them worked fine for us. We tried zooming with mouse and by code using SetMinMax function. And we tried also with 3D activated/deactivated, and with .pointer.visible true and false...

Could you please modify the following code to reproduce the problem? This seems to work fine here.

Code: Select all

Private Sub Form_Load()
  TChart1.AddSeries scLine
  
  TChart1.Series(0).AddXY 1.08, 2.08, "", clTeeColor
  TChart1.Series(0).AddXY -1.38, -2.38, "", clTeeColor
  TChart1.Series(0).AddXY 1.64, 2.64, "", clTeeColor
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

Tuan Nguyen
Newbie
Newbie
Posts: 23
Joined: Fri Feb 23, 2007 12:00 am

Post by Tuan Nguyen » Thu Apr 17, 2008 8:47 am

Hi Yeray,

The problem still occur on my environment. I have just uploaded my problem by picture on your server at [TeeChart_Error_Zoom.zip] file. Please check it.

Best regards,
Tuan Nguyen

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

Post by Yeray » Thu Apr 17, 2008 9:47 am

Hi Tuan,

Thank you for the pictures. We've made a chart like yours with the following code:

Code: Select all

m_Chart1.GetAspect().SetView3D(false);

long series1; 
series1 = m_Chart1.AddSeries(scLine);

m_Chart1.Series(series1).GetXValues().SetOrder(loNone);

m_Chart1.Series(series1).AddXY(1.08, 2.08, "", clTeeColor);
m_Chart1.Series(series1).AddXY(-1.38, -2.38, "", clTeeColor);
m_Chart1.Series(series1).AddXY(1.64, 2.64, "", clTeeColor);
But we don't understand how you could do a zoom as near to the left axis as you indicate at the picture. This makes us think that you set the property "Zoom on Up Left drag" as true (at design time because it's not possible to change it by code until teechart v8 ). And even changing this, and zooming by mouse, we can't reproduce any irregularity.

So, could you please explain how do you exactly perform your zoom? If you think that a video would illustrate better how do you do this, feel free to make one and send it to us (here is a free tool that you could use).
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

Tuan Nguyen
Newbie
Newbie
Posts: 23
Joined: Fri Feb 23, 2007 12:00 am

Post by Tuan Nguyen » Thu Apr 17, 2008 10:14 am

Hi Yeray,

Thank you very much for your feedback.

I have just uploaded a video for the problem n your server at [TeeChart_Zoom_Video.zip] file. I use [Add data arrays] demo of Visual C++ 6.0 to demo for the problem.

Best regards,
Tuan Nguyen

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

Post by Narcís » Thu Apr 17, 2008 11:54 am

Hi Tuan,

Thanks for the video. We are still unable to reproduce the problem here as you do. Could you please send us the project you are using so that we can run it "as-is" to reproduce the issue here?

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

Tuan Nguyen
Newbie
Newbie
Posts: 23
Joined: Fri Feb 23, 2007 12:00 am

Post by Tuan Nguyen » Fri Apr 18, 2008 7:01 am

Hi Narcís,

I understand the problem don't occur on your environment. Please change your code as below:

Code: Select all

DWORD numElements[] = {3};
COleSafeArray p_pArrXValues;
COleSafeArray p_pArrYValues;
p_pArrXValues.Create(VT_R8, 1, numElements);	
p_pArrYValues.Create(VT_R8, 1, numElements);

long lIndex = 0;
double dbValueX = 1.08;
double dbValueY = 2.08;
p_pArrXValues.PutElement(&lIndex, &dbValueX);
p_pArrYValues.PutElement(&lIndex, &dbValueY);
	
lIndex = 1;
dbValueX = -1.38;
dbValueY = -2.38;
p_pArrXValues.PutElement(&lIndex, &dbValueX);
p_pArrYValues.PutElement(&lIndex, &dbValueY);

lIndex = 2;
dbValueX = 1.64;
dbValueY = 2.64;
p_pArrXValues.PutElement(&lIndex, &dbValueX);
p_pArrYValues.PutElement(&lIndex, &dbValueY);
		      m_Chart1.Series(series1).AddArray(p_pArrXValues.GetOneDimSize(), p_pArrYValues, p_pArrXValues);
Best regards,
Tuan Nguyen

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 Apr 18, 2008 7:55 am

Hi Tuan,

Thanks for the information but I'm still unable to reproduce the problem here using this code:

Code: Select all

	m_Chart1.GetAspect().SetView3D(false);

	long series1;
	series1 = m_Chart1.AddSeries(scLine);

	m_Chart1.Series(series1).GetXValues().SetOrder(loNone); 

	DWORD numElements[] = {3};
	COleSafeArray p_pArrXValues;
	COleSafeArray p_pArrYValues;
	p_pArrXValues.Create(VT_R8, 1, numElements);   
	p_pArrYValues.Create(VT_R8, 1, numElements);

	long lIndex = 0;
	double dbValueX = 1.08;
	double dbValueY = 2.08;
	p_pArrXValues.PutElement(&lIndex, &dbValueX);
	p_pArrYValues.PutElement(&lIndex, &dbValueY);
   
	lIndex = 1;
	dbValueX = -1.38;
	dbValueY = -2.38;
	p_pArrXValues.PutElement(&lIndex, &dbValueX);
	p_pArrYValues.PutElement(&lIndex, &dbValueY);

	lIndex = 2;
	dbValueX = 1.64;
	dbValueY = 2.64;
	p_pArrXValues.PutElement(&lIndex, &dbValueX);
	p_pArrYValues.PutElement(&lIndex, &dbValueY);
	m_Chart1.Series(series1).AddArray(p_pArrXValues.GetOneDimSize(), p_pArrYValues, p_pArrXValues); 
Could you please confirm that you are using v7.0.1.4 and send us a simple example project we can run "as-is" to reproduce the problem here?

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

Tuan Nguyen
Newbie
Newbie
Posts: 23
Joined: Fri Feb 23, 2007 12:00 am

Post by Tuan Nguyen » Fri Apr 18, 2008 8:17 am

Hi Narcís,

I have just update our code on your sever at [Zoom_Bug.zip] file. Notice: in the file, i send you the build and picture about problem in [Application] folder. I hope with the information you can reproduce the problem.

Best regards,
Tuan Nguyen

Andrew FT
Newbie
Newbie
Posts: 32
Joined: Thu Mar 31, 2005 5:00 am
Location: Toronto, Canada

Post by Andrew FT » Mon Apr 21, 2008 10:15 pm

I have also seen this before, and the problem is still present in TeeChart AX version 8. The problem I have occurs with scatter plots where X values are out of order and the Xvalues.Sort is not active (false). To increase the chances of reproducing the problem, generate a point plot with lots of random XY values and then try zooming into it. When zoomed in, all the points will disappear. Only zooming on the X axis is affected - seems to be some sort of culling problem. If XValues.Sort is turned on and the points are sorted in increasing X-order, the problem goes away.

I will try to post a code snippet to reproduce...

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 Apr 22, 2008 10:19 am

Hi Tuan,

Thanks for the example project. We could reproduce the problem here and the issue can be resolved setting XValues to not being sorted before populating the series, as in the code snippet I posted:

Code: Select all

   m_Chart1.Series(series1).GetXValues().SetOrder(loNone); 
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