Page 1 of 1

Center the label in a Symbol

Posted: Wed Oct 13, 2004 4:16 pm
by 6921249
Hey Guys,

I'm building a Bubble chart, my labels are simple numbers 1, 2, 3, etc. they are showing up in the top of the symbol / bubble, is there a way to center the numbers?

No is an acceptable answer :D

Here is the code I'm using, i is the number / label.

Code: Select all

adoRs.MoveFirst 
Do Until adoRs.EOF 
With QuadrantChart.Series(1).asBubble 
.AddBubble adoRs.Fields(3).Value, adoRs.Fields(2).Value, 1.5, i, RGB(ChartColorRed(i), ChartColorGreen(i), ChartColorBlue(i)) 
i = i + 1 
adoRs.MoveNext 
End With 
Loop]
[/code]

Posted: Wed Oct 13, 2004 10:04 pm
by Pep
Hi Mike,
the top of the symbol / bubble, is there a way to center the numbers?
Yes, you can use the following code :

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scBubble
    .Series(0).FillSampleValues (5)
    .Series(0).Marks.Visible = True
    .Aspect.View3D = False
    .Environment.InternalRepaint
    For i = 0 To .Series(0).Count - 1
        .Series(0).Marks.Positions.Position(i).Custom = True
        .Series(0).Marks.Positions.Position(i).LeftTop.Y = TChart1.Series(0).CalcYPosValue(TChart1.Series(0).YValues.Value(i)) - (.Canvas.TextHeight("H") / 2)
    Next i
End With
End Sub