Page 1 of 1

Don't display data when zooming

Posted: Thu Apr 17, 2008 6:52 am
by 9534357
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

Posted: Thu Apr 17, 2008 8:26 am
by yeray
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

Posted: Thu Apr 17, 2008 8:47 am
by 9534357
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

Posted: Thu Apr 17, 2008 9:47 am
by yeray
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).

Posted: Thu Apr 17, 2008 10:14 am
by 9534357
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

Posted: Thu Apr 17, 2008 11:54 am
by narcis
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.

Posted: Fri Apr 18, 2008 7:01 am
by 9534357
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

Posted: Fri Apr 18, 2008 7:55 am
by narcis
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.

Posted: Fri Apr 18, 2008 8:17 am
by 9534357
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

Posted: Mon Apr 21, 2008 10:15 pm
by 9526464
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...

Posted: Tue Apr 22, 2008 10:19 am
by narcis
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);