Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Suppress final zero
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jerzy

3 Posts

Posted - 21 Jun 2007 :  22:39:08  Show Profile  Reply with Quote
I use SetValidData method to suppress zeros so that they do not plot. This works if there is more than one zero, but if the dataset has only one final zero, I can not stop it from plotting. How can I suppress thios final zero?

jerzy

3 Posts

Posted - 22 Jun 2007 :  08:13:57  Show Profile  Reply with Quote
I reproduced the behavior I referred to in my earlier post using the "LabeledDatapoints" example. After the program code that calculates the 19 data points, I set y1(18) and y1(17)= 0.
I added a loop using SetValidData = false when y1 = 0.
This works: the plot ends after 17 points. When I then set only
y1(18) = 0, the plot shows this final zero.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 22 Jun 2007 :  08:45:38  Show Profile  Reply with Quote
What you describe is a bug that we will fix it in the next update, 3-4 weeks. In the meantime your best alternative is to not include a data point as the last point in a dataset if you intend to mark it invalid anyway. Or once it is in the dataset you can just delete it.

if (Dataset1[18].Y == 0)
	Dataset1.DeleteDataPoint(18);
Go to Top of Page

quinncurtis

1164 Posts

Posted - 22 Jun 2007 :  10:32:06  Show Profile  Reply with Quote
An even better workaround is to just set the SegmentAttributesMode of the plot object, true;

SimpleLineMarkerPlot thePlot1 =
   new SimpleLineMarkerPlot(pTransform1, Dataset1,  ChartObj.SQUARE, attrib1,attrib2, 0, 1);

thePlot1.SetSegmentAttributesMode(true);


That change forces the line plot drawing routine to use routines that do not have the bug.
Go to Top of Page

jerzy

3 Posts

Posted - 22 Jun 2007 :  20:56:43  Show Profile  Reply with Quote
Thank you for the quick replies. The SetSegmentAttributesMode method gives the desired result

jerzy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07