Page 1 of 1

Any way to wrap data vertically

Posted: Tue Feb 08, 2005 2:32 am
by 8126844
Is there any way to "wrap" data vertically, so that y values greater than the maximum on the y axis are displayed as though the top of the chart wraps around to the bottom? This is a customary method for displaying data recorded from laboratory experiments, but I cannot figure out any way (at least any simple way) to do it with TeeChart.

Thanks,
john

Posted: Tue Feb 08, 2005 9:23 am
by narcis
Hi John,

Could you please send us an image of what you are describing or point us to an example in internet?

You can post the image at steema.public.attachments newsgroup available at news://www.steema.net

Thanks in advance.

Posted: Tue Feb 08, 2005 2:43 pm
by 8126844
OK, I made a simple chart in a spreadsheet to show what I am trying to do, and sent it to steema.public.attachments.

Posted: Tue Feb 08, 2005 3:56 pm
by narcis
Hi John,

Thanks for the image. Yes, this can be done several ways, one would be doing:

Code: Select all

int i;

tChart1.Axes.Left.Automatic=false;
tChart1.Axes.Left.Maximum=0;
tChart1.Axes.Left.Maximum=10;

tChart1.Axes.Bottom.Automatic=false;
tChart1.Axes.Bottom.Minimum=0;
tChart1.Axes.Bottom.Maximum=10;

for(i=0;i<tChart1.Axes.Bottom.Maximum;i++) 
{   				
	if (i+4>tChart1.Axes.Left.Maximum) 
	points1.Add((i+4)%tChart1.Axes.Left.Maximum);
else
	points1.Add(i+4);
}
You will find this project attached to a reply to your message in the newsgroups

Posted: Wed Feb 09, 2005 1:05 am
by 8126844
Well yes, I was aware that I can always modify my data. (And yes, I know that the formula is a bit trickier if the y axis doesn't start at zero.) I was looking for something a little more automated, so that I don't have to keep a copy of the original data around in the event I want to adjust the min/max axis values. I guess I will try putting the logic for this into a custom series function.

Posted: Thu Feb 10, 2005 12:12 pm
by narcis
Hi John,

I have included your suggestion to our wish list to be considered for future releases.