Page 1 of 1

"Bubble hints" with VBScript

Posted: Wed Nov 28, 2007 8:49 am
by 15046980
Hi,

I'm using AddXY to paste point on the Graph (VBScript language). The first and the second arguments - are X and Y coordinate. The third argument is a hint.

I want to see this hint only when a mouse is over the point (bubble hint). How can I do it using VBScript?

Thanks in advance,
Danila.

Posted: Wed Nov 28, 2007 10:35 am
by narcis
Hi Danila,

To achieve this you just need to add a MarksTip tool associated to the bubble series as shown here:

Code: Select all

Private Sub Form_Load()
    For i = 0 To 10
        TChart1.Series(0).asBubble.AddBubble i, i, 1, "bubble " & CStr(i), clTeeColor
    Next i
    
    TChart1.Series(0).Marks.Visible = False
    
    TChart1.Tools.Add tcMarksTip
    TChart1.Tools.Items(0).asMarksTip.Series = TChart1.Series(0)
End Sub
Also notice that the best way to populate a bubble series is using AddBubble method. As described in the help file, 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.

function AddBubble(AX, AY, ARadius: Double; Const AXLabel: WideString; Value: OLE_COLOR): Integer;

Posted: Thu Nov 29, 2007 2:29 pm
by 15046980
Hi, NarcĂ­s!

I'm sorry, but I mean "bubble hint" in another meaning :roll:

I mean something like "Rectangle Tool - MouseOverHints" from VB examples of TeeChart installation.

So, I want to demonstrate a hint when mouse is over point. But example code from "Rectangle Tool - MouseOverHints" from VB examples does not work :(

May be there are some specific method for VBScript to do this?

Thanks in advance,
Danila.

Posted: Thu Nov 29, 2007 2:38 pm
by narcis
Hi Danila,

As you can read in this example description, it demostrates how can the Rectangle Tool be used to simulate the MarkTipsTool showing hints when mouse is over the series. Do you have any inconvenient in using MarkTips for this?

Thanks in advance.