Stopping End & Start Points joining?
Posted: Wed Aug 25, 2004 8:25 am
I am Using C# for the .NET compact framework with the TeeChat.Pocket libary on a Pocket PC 2003.
My graph is drawn continusly with rolling points, however i have also enabled so that graph value s are written to a file and when a user clicks a button the graph pause's and retrieves the values from the file to draw a static graph between 2 points.
This works fine, however once, the static graph has finished being plotted a line shoots across the screen backwards joining the last plotted point to the first plotted point. This looks rather ugly and was wondering if there is a way to stop it? Any help would be grately appreciated, Mods.
My code for drawing the static graph is as follows:
//for every differnet series appearing on the graph:
for(int i = 0; i < this.horizLine1Array.Length; i++)
{
//there is other code here to do with displaying text on the windows form
// and storing the data, nothing to do with drawing the graph.....
//makes sure the graph is only drawn once, not continiously:
if(!this.alreadyDrawnReviewData)
{
//for all the points for each series on the screen (usually around 50):
for(int j = 0; j < this.holdingDateTimeArray.Length; j++)
{
//add all the points one series at a time:
this.horizLine1Array.Add(this.holdingValuesArray[j,i], this.holdingDateTimeArray[j]);
}//end for
//if we have just drawn the review data for the last parameter series, then there is no need to draw them again so set this flag to true:
if(i == this.horizLine1Array.Length - 1)
{
this.alreadyDrawnReviewData = true;
}//end if
}//end if
}//end for
My graph is drawn continusly with rolling points, however i have also enabled so that graph value s are written to a file and when a user clicks a button the graph pause's and retrieves the values from the file to draw a static graph between 2 points.
This works fine, however once, the static graph has finished being plotted a line shoots across the screen backwards joining the last plotted point to the first plotted point. This looks rather ugly and was wondering if there is a way to stop it? Any help would be grately appreciated, Mods.
My code for drawing the static graph is as follows:
//for every differnet series appearing on the graph:
for(int i = 0; i < this.horizLine1Array.Length; i++)
{
//there is other code here to do with displaying text on the windows form
// and storing the data, nothing to do with drawing the graph.....
//makes sure the graph is only drawn once, not continiously:
if(!this.alreadyDrawnReviewData)
{
//for all the points for each series on the screen (usually around 50):
for(int j = 0; j < this.holdingDateTimeArray.Length; j++)
{
//add all the points one series at a time:
this.horizLine1Array.Add(this.holdingValuesArray[j,i], this.holdingDateTimeArray[j]);
}//end for
//if we have just drawn the review data for the last parameter series, then there is no need to draw them again so set this flag to true:
if(i == this.horizLine1Array.Length - 1)
{
this.alreadyDrawnReviewData = true;
}//end if
}//end if
}//end for