Page 1 of 1
Name near each bubble using TeeChart Pro 5.0
Posted: Tue Jun 02, 2009 10:54 am
by 6924564
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.
Posted: Tue Jun 02, 2009 2:04 pm
by yeray
Hi CS,
I'm not sure to understand the problem. Why don't you use series' marks?
some more explanation
Posted: Wed Jun 03, 2009 8:57 am
by 6924564
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.
Posted: Wed Jun 03, 2009 10:01 am
by yeray
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
Posted: Thu Jun 04, 2009 10:32 am
by 6924564
thanks Yeray. It worked.