"Stairs" line series with null points is not drawn correctly

TeeChart for ActiveX, COM and ASP
Post Reply
jhameenniemi
Newbie
Newbie
Posts: 17
Joined: Mon Apr 15, 2013 12:00 am

"Stairs" line series with null points is not drawn correctly

Post by jhameenniemi » Mon Apr 29, 2013 7:07 am

TeeChart 2012.0.0.9 ActiveX component. Line series with "stairs" option selected and null point in series to cut line. First line section AFTER null point from (x.1, y.1) to (x.2, y.2) is not drawn correctly (x.1, y.1 -> x.2, y.1 -> x.2, y.2) but using y value BEFORE null point i.e. (x.1, y.1 -> x.2, y.-1 -> x.2, y.2). Pictures of a sampe data and the resulting line series attached.
TeeChart 2012 3.jpg
TeeChart 2012 3.jpg (120.83 KiB) Viewed 9973 times
TeeChart 2012 1.jpg
TeeChart 2012 1.jpg (25.8 KiB) Viewed 9972 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: "Stairs" line series with null points is not drawn correctly

Post by Sandra » Mon Apr 29, 2013 10:35 am

Hello

I suggest you see next code, so it works in correct way for me using latest version Activex( v2012.0.0.9 ).

Code: Select all

Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine

With TChart1.Series(0)
.AddXY DateTime.TimeValue("13:35.40"), 4.072, "", vbBlack
.AddXY DateTime.TimeValue("13:35.51"), 3.79, "", vbBlack
.AddXY DateTime.TimeValue("13:36.02"), 3.79, "", vbBlack
.AddXY DateTime.TimeValue("13:36.24"), 4.134, "", vbBlack
.AddXY DateTime.TimeValue("13:36.24"), 4.134, "", vbBlack
.AddXY DateTime.TimeValue("13:36.28"), 3.161, "", vbBlack
.AddXY DateTime.TimeValue("13:36.40"), 4.086, "", vbBlack
.AddXY DateTime.TimeValue("13:36.51"), 4.086, "", vbBlack
 End With
TChart1.Series(0).asLine.Stairs = True
TChart1.Series(0).XValues.DateTime = True
TChart1.Series(0).SetNull 3
TChart1.Axis.Bottom.Labels.DateTimeFormat = "hh.mm.ss"
Could you tell us if previous code works in your end?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

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

Re: "Stairs" line series with null points is not drawn correctly

Post by Yeray » Mon Apr 29, 2013 12:40 pm

Hi,
jhameenniemi wrote:Line series with "stairs" option selected and null point in series to cut line
Maybe you meant FastLine series?
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

jhameenniemi
Newbie
Newbie
Posts: 17
Joined: Mon Apr 15, 2013 12:00 am

Re: "Stairs" line series with null points is not drawn correctly

Post by jhameenniemi » Tue Apr 30, 2013 6:54 am

Sorry, I should have been more specific. Yeray, you are correct... the series is a FastLine series with "TreatNulls" property set to "Don't Paint" and "Stairs" property set to "TRUE".

We are using C++ here's a code to reproduce the problem:

Code: Select all

	m_wndChart.GetAspect().SetView3D(FALSE);

	long seriesIndex = m_wndChart.AddSeries(scFastLine);

	CSeries& series = m_wndChart.Series(seriesIndex);

	series.AddXY(TimeToDateTime("13:35.40"), 4.072, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:35.51"), 3.79, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.02"), 3.79, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.24"), 4.134, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.24"), 4.134, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.28"), 3.161, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.40"), 4.086, "", RGB(0, 0, 0));
	series.AddXY(TimeToDateTime("13:36.51"), 4.086, "", RGB(0, 0, 0));

	series.GetAsFastLine().SetStairs(TRUE);
	series.GetAsFastLine().SetTreatNulls(tnDontPaint);

	series.GetXValues().SetDateTime(true);
	series.SetNull(3);

	m_wndChart.GetAxis().GetBottom().GetLabels().SetDateTimeFormat("hh.mm.ss");
Line is not drawn correctly. We did not have this problem with TeeChart ActiveX 8 with the same code.

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

Re: "Stairs" line series with null points is not drawn correctly

Post by Yeray » Tue Apr 30, 2013 9:01 am

Hi,

I found a fix for it (TV52016561). The next maintenance release will include it.
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

Post Reply