"Bubble hints" with VBScript

TeeChart for ActiveX, COM and ASP
Post Reply
ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

"Bubble hints" with VBScript

Post by ModelTech » Wed Nov 28, 2007 8:49 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 28, 2007 10:35 am

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;
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

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Thu Nov 29, 2007 2:29 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 29, 2007 2:38 pm

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.
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