spatial view for charting

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
LG
Newbie
Newbie
Posts: 30
Joined: Tue Apr 08, 2003 4:00 am

spatial view for charting

Post by LG » Tue Jun 19, 2007 10:35 am

Dear All,

I would like to chart the spatial view series in TeeChart. What I would like to do I have the name in the X-Axis and Values on the Y Axis.

I would like to show a dot size that is large for large Y values and small for small X values. Either the smallest dots will be the most negative values or the negative values will be shown in a different colour.

Is there anyway to implement this in TeeChart? Please advise.

Regards,

LG

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

Post by Narcís » Tue Jun 19, 2007 10:49 am

Hi LG,

You could try doing this with bubble series where you can specify each bubble radius. You could make radius proportional to Y value. You can also set the bubble style (circle, rectangle, triangle, etc.). You'll find examples at the features demo at All Features\Welcome !\Chart styles\Standard\Bubble. Features demo can be found at TeeChart's program group.
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

LG
Newbie
Newbie
Posts: 30
Joined: Tue Apr 08, 2003 4:00 am

Post by LG » Wed Jun 20, 2007 7:21 am

Thanks for that. I am now using the bubble. I am trying to split the positive and negative values with different colour. My TeeChart version is 1.0

I am using like this but it just does not work. Acutally in my case, it should be 40% red and 60% blue of all bubbles in the chart as there are 40% of negative values. Strangly I see just a couple of pink colour, and dark red colour!

Code: Select all

buble.ColorEach = true;
if (fltRadius < 0) 
{
 buble.Add(floatX, floatY, fltRadius, strLabel, Color.Red);
}
else
{
 buble.Add(floatX, floatY, fltRadius, strLabel, Color.Blue);
}

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Wed Jun 20, 2007 8:38 am

Hi LG

The add methods to Bubble Series works the follow way: (X,Y) parameters are the position of the center of Bubble. The radius can't be negative, so you should to put the radius with absolut value, as below code:

Code: Select all

 bubble1.ColorEach = true;
           Random X = new Random();
           Random Y = new Random();
           for (int i = -5; i < 5; i++)
           {
               if (i < 0)
                    bubble1.Add(X.Next(10), Y.Next(10), Math.Abs(i), "Red "+i.ToString(),Color.Red);
               else
                    bubble1.Add(X.Next(10), Y.Next(10), Math.Abs(i), "Blue "+i.ToString(),Color.Blue);
           }
Another question is that the color isn't painted correctly in version 1. I've tried it with the version 3, and it works fine.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply