Name near each bubble using TeeChart Pro 5.0

TeeChart for ActiveX, COM and ASP
Post Reply
CS
Newbie
Newbie
Posts: 22
Joined: Sat Jun 08, 2002 4:00 am

Name near each bubble using TeeChart Pro 5.0

Post by CS » Tue Jun 02, 2009 10:54 am

I am using TeeChart Pro 5.0. I want to put the name of the item near the plotted bubble. My requirement is to have an x axis, y axis and a third item to be plotted with respect to x and y.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Jun 02, 2009 2:04 pm

Hi CS,

I'm not sure to understand the problem. Why don't you use series' marks?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

CS
Newbie
Newbie
Posts: 22
Joined: Sat Jun 08, 2002 4:00 am

some more explanation

Post by CS » Wed Jun 03, 2009 8:57 am

I want some thing like below.
X
X b NameB
X
X bNameC
X
0YYYYYYYYYYYYYYYYYY

Where x is s axis.Y is y axis. b is bubble. NameB and NameC is explanation(some text) for bubble.
I am able top put bubble in my graph. How to put the text(NameB,NameC) in the graph. Hope you understood what I am loking for..Pls give me a sample if we can do this.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jun 03, 2009 10:01 am

Hi CS,

I think that you could do something like in this example:

Code: Select all

Private Sub Form_Load()
  TChart1.AddSeries scBubble
  
  With TChart1.Series(0).asBubble
      .AddBubble 1, 8, 2, "Name B", clTeeColor
      .AddBubble 1, 2, 1, "Name C", clTeeColor
  End With
  
  TChart1.Series(0).Marks.Visible = True
  With TChart1.Axis.Bottom
    .Labels.Style = talValue
    .SetMinMax 0, 5
  End With

  TChart1.Axis.Left.SetMinMax 0, 10


End Sub

Private Sub TChart1_OnAfterDraw()
  For i = 0 To TChart1.Series(0).Count - 1
    With TChart1.Series(0)
      .Marks.Positions.Position(i).Custom = True
      .Marks.Positions.Position(i).LeftTop.X = TChart1.Axis.Bottom.CalcXPosValue(.XValues.Value(i)) + (.asBubble.RadiusValues.Value(i) * 40)
      .Marks.Positions.Position(i).LeftTop.Y = TChart1.Axis.Left.CalcYPosValue(.YValues.Value(i))
    End With
  Next i
End Sub
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

CS
Newbie
Newbie
Posts: 22
Joined: Sat Jun 08, 2002 4:00 am

Post by CS » Thu Jun 04, 2009 10:32 am

thanks Yeray. It worked.

Post Reply