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
spatial view for charting
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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!
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);
}
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:
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.
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);
}