No constant radius in Bubble Chart?

TeeChart for ActiveX, COM and ASP
Post Reply
Productivity Guy
Newbie
Newbie
Posts: 21
Joined: Tue Mar 01, 2005 5:00 am
Location: Spokane, WA
Contact:

No constant radius in Bubble Chart?

Post by Productivity Guy » Thu Nov 15, 2007 12:26 am

I see from another post that:
However, the chart is scaled according to X and Y values. So when the bubbles are drawn, if they have very small radius compared to the axes scales they won't be seen.
So, there's no way of having a constant bubble radius, independent of the chart scale?

That seems like an odd decision. What is the reasoning for that?

Some more questions about radius:

What is the relationship between the radius value and the chart scale? IOW, if the scale in one chart is 1 to 50, with a radius of 75, what would I need the radius to be in a second chart that has a scale of 1 to 100 to have the same visible radius?

How is the chart scale used to adjust the bubble radius? If the Y scale is 0.1 to 1.0 and the X scale is 0 to $1,000,000, how does the radius get determined? If X scale changes, but Y stays constant, does the radius change?

Can you please provide a clear explanation of the radius value and its relationship to the scales?

Thanks.

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

Post by Narcís » Thu Nov 15, 2007 9:18 am

Hi Productivity Guy,

Radius values in bubble series are absolute values and are not dependent to axes scales.

So, for example, in the code snippet below, the OnLoad event will create a bubble at 0,0 with the radius of 1 unit in axes scales. Therefore, when pressing the button and doubling axes scales the size of the bubble will be reduced to a half.

Code: Select all

Private Sub Command1_Click()
    TChart1.Axis.Left.SetMinMax -50, 50
    TChart1.Axis.Bottom.SetMinMax -50, 50
End Sub

Private Sub Form_Load()
    TChart1.Series(0).asBubble.AddBubble 0, 0, 1, "", clTeeColor
    TChart1.Axis.Left.SetMinMax -25, 25
    TChart1.Axis.Bottom.SetMinMax -25, 25
End Sub
I hope an example is clearer than an explanation. English is not my mother tongue so if my explanation is not clear don't hesitate to let me know.
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

Productivity Guy
Newbie
Newbie
Posts: 21
Joined: Tue Mar 01, 2005 5:00 am
Location: Spokane, WA
Contact:

Post by Productivity Guy » Thu Nov 15, 2007 9:59 pm

I'm still struggling with the concept of the radius being in "Units" of the axes scales.

Which axis? If X is 1 to 50 and Y is 1 to 100, and radius is 10, which scale determines the bubble size? Is it 1/20 of X or 1/10 of Y? Or, is is something else, entirely?

In playing with your sample code, I still can't figure it out. I've changed both the X and the Y axes, and it LOOKS like the Y axis takes preference. But, I'm not 100% confident in that conclusion.

Can you clarify?

Productivity Guy
Newbie
Newbie
Posts: 21
Joined: Tue Mar 01, 2005 5:00 am
Location: Spokane, WA
Contact:

Post by Productivity Guy » Fri Nov 16, 2007 6:37 am

OK. I THINK I got it.

In my tests (though not comprehensive), the radius is based on the Y axis. Changing the X axis seems to have no effect.

I FINALLY think I understand what a unit is. I kept getting confused by thinking it was a RATIO of the scale. But, it's not. It's just like you said: a unit. It's a 1.

If the Y axis goes from 1 to 10, that's 10 units. If it goes from 1 to 50, that's 50 units.

The bubble gets "bigger" as the scale shrinks, because the space between units gets bigger. As the scale increases, the bubble gets smaller because the space between units gets smaller.

Have I got that right?

It should NOT have been so hard to figure out the radius. There is no explanation of this at all (that I could find) in the v7 documention.

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 Nov 16, 2007 8:55 am

Hi Productivity Guy,

Yes, that's right. I'm glad to hear you understood this.
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