Need help to draw bubble chart

TeeChart for ActiveX, COM and ASP
Post Reply
Aravind
Newbie
Newbie
Posts: 75
Joined: Fri Nov 15, 2002 12:00 am

Need help to draw bubble chart

Post by Aravind » Tue Apr 04, 2006 11:56 am

i need help to draw bubble chart for the sample data

Year units value
2001 10 9000
2002 15 50000
2003 35 30000
2004 34 5000


i dnot find any example code for drawing bubble chart ...

pls help in this regard asap

thanks & regards
aravind

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 Apr 04, 2006 12:03 pm

Hi Aravind,

To add bubbles in a bubble series you need to use AddBubble method:

Code: Select all

function AddBubble(AX, AY, ARadius: Double; Const AXLabel: WideString; Value: OLE_COLOR): Integer;
The AddBubble method appends a new Bubble point to the Series Points List. The Bubble point is assigned to be at AX,AY coordinates and have ARadius, Label and Color parameters. The Label parameter is used to draw Axis Labels, Bubble Marks and Legend.

So you data may be added to the series doing something like:

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).asBubble.AddBubble 2001, 10, 9000, "", clTeeColor
    TChart1.Series(0).asBubble.AddBubble 2002, 15, 50000, "", clTeeColor
    TChart1.Series(0).asBubble.AddBubble 2003, 35, 30000, "", clTeeColor
    TChart1.Series(0).asBubble.AddBubble 2004, 34, 5000, "", clTeeColor
End Sub
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