Page 1 of 1

Multiple custom horizontal axes

Posted: Fri Aug 26, 2005 1:33 pm
by 8884730
I am having multiple horizontal axes for displaying multiple independent curve data with different units on the x axis. The idea is to have only one horizontal axis visible at the time but multiple curve data visible at the same time. This means that some of the data visible is related to x values on invisible axes. The values on the x axes are real numbers.

The grid lines are visible but no labels are visible. So, what to do?
By accident I realized that if I set the property OtherSide on the axes, it shows exactly as I want with labels and all except that the axis is located as the OtherSide property states, on the other side. Sigh...

Posted: Fri Aug 26, 2005 1:43 pm
by narcis
Hi tekwiz,

This is most likely because of you set the axes being invisible. What you should do is making all axes visible but setting them all in the same position so that they overlap in the way of a unique axis.

Posted: Mon Aug 29, 2005 6:20 am
by 8884730
Thankyou for the quick reply.

But, if I make all axes visible, all labels/Titles/grids will be visible too. So this will create a major mess with all labels stacked upon eachother.

So what I want is:
- All horizontal axes is on the same position
- Only one axis visible at a time, with all labels for that axis visible, but no other labels or titles.
- all data related to all axes visible at the same time.
- easily switch the visible axis.

thanks

Posted: Mon Aug 29, 2005 7:24 am
by 8884730
Is it possible for me to post code that illustrates the behaviour?
Or is it too long and too much work for you guys?

Posted: Mon Aug 29, 2005 8:57 am
by narcis
Hi tekwiz,
But, if I make all axes visible, all labels/Titles/grids will be visible too. So this will create a major mess with all labels stacked upon eachother.
Not necessarily, you can make grid lines, ticks, title, etc. not being visible for all axes. This can be done either at design-time or a at run-time.
So what I want is:
- All horizontal axes is on the same position
- Only one axis visible at a time, with all labels for that axis visible, but no other labels or titles.
- all data related to all axes visible at the same time.
- easily switch the visible axis.
You could make visible the bottom axis of the series you are pointing with the mouse using series or tchart events or select which axis to display using buttons, etc.
Is it possible for me to post code that illustrates the behaviour?
Yes, you can post your projects at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Mon Aug 29, 2005 10:29 am
by 8884730
Hi and thanks again for the quick reply.

My problem is not how to make the axis visible(I think) it is just that when I make them visible, the labels does not show up, unless otherside is true, which I do not want it to.
I post a solution and example code now, please look at the code and tell me what is wrong.

firewall problems

Posted: Mon Aug 29, 2005 10:39 am
by 8884730
It seems that our company firewall blocks NNTP traffic, is it possible for me to email the source (582 kB zipped) ?

Posted: Mon Aug 29, 2005 10:51 am
by narcis
Hi tekwiz,

Yes, you can send it directly to me. However, what do you think about my suggestions?

Posted: Mon Aug 29, 2005 11:39 am
by narcis
Hi tekwiz,

I've received your example and reproduced what you reported. It has an easy solution, just add the following statements to your project:

Code: Select all

			tChart1.Panel.MarginUnits = PanelMarginUnits.Pixels;
			tChart1.Panel.MarginBottom=25;
This is a behaviour we are aware of and it isn't a bug as only applies to custom axes which position has to be customized.

Posted: Mon Aug 29, 2005 11:45 am
by 8884730
Thanks, works as a charm :-)
I had tried to "lift" the axes by their placement, but I had not tried to increase the margins.

Thanks a lot. :-)

Posted: Mon Aug 29, 2005 11:53 am
by narcis
Hi tekwiz,

You're welcome! I'm glad to hear this fits your needs.