Group several variables on X-axis?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
tomster
Newbie
Newbie
Posts: 20
Joined: Tue Aug 02, 2005 4:00 am
Location: Stockholm, Sweden

Group several variables on X-axis?

Post by tomster » Fri Jan 20, 2006 1:58 pm

I will try to explain what I want to do with the purpose of finding out if this is doable in an easy way.

What I want to do is to have a series with some values for Y and with several variables linked to it's X, probably as labels. What do I mean with several variables? Well, imagine that you have data that is grouped somehow, in our example we have hierarchical entities that have statistical data, so it might look like this:

Code: Select all

Y
|
|
|
|
|
|
|
_______________________________ X
|   |   |   |   |   |   |   |   |
0    5     8    12   4    6     9    22   35
|                |                |
______________________________
        |                      |
    Group 1               Group 2

That is basically what I want it to look like. Basically you say "this column is Y, this is X1 and this is X2 for this series" or something like it.

Any ideas?

Is this doable with the TeeChart in some easy way?

Cheers,
Tommie Nygren

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 20, 2006 4:02 pm

Hi Tommie,

You have 2 options for doing that:

1) Adding a custom horizontal axis located where you need with a fake series with all points being transparent associated and add custom labels to this axis. You'll find an example of custom axis labels at the TeeChart features demo, available at its program group. The example is "All Features\Welcome !\Axes\Labels\Custom labels".

2) Custom drawing on TChart's canvas to draw a line and the desired text calculating the text position with the series CalcXPos, CalcXPosValue, ... methods. For an example on how to custom draw on TeeChart's canvas you can look at the examples under "All Features\Welcome !\Canvas" in the features demo.
Best Regards,
Narcís Calvet / 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

Post Reply