AntiAlias breaks MouseClick?

TeeChart for ActiveX, COM and ASP
Post Reply
Productivity Guy
Newbie
Newbie
Posts: 21
Joined: Tue Mar 01, 2005 5:00 am
Location: Spokane, WA
Contact:

AntiAlias breaks MouseClick?

Post by Productivity Guy » Tue Nov 13, 2007 9:14 pm

I have a bubble chart and I want to display bubble labels on click.

I managed to put together some code that works --- BUT it only works with antialias turned off. (And, the bubbles look VERY bad without antialiasing.

Here's the code:

Code: Select all

  Set rs = GetBubbleRS("Unit", "CEO", "")
  
  With TChart1
    .Aspect.View3D = False
    ';.Canvas.UseAntiAlias = True
    
    With rs
      Do While Not .EOF
        ctr = ctr + 1
        TChart1.Series(0).asBubble.AddBubble !LS, !LL * 100, 2.5, !Item, RGB(0, 0, 255)
        TChart1.Series(0).asBubble.RadiusValues.Value(ctr - 1) = 0.15
        
        .MoveNext
      Loop
    End With
    
    .Series(0).asBubble.Pointer.Gradient.Visible = True
    tmp = .Axis.Left.CalcXSizeValue(.Series(0).asBubble.RadiusValues.First)
    .Axis.Bottom.MinimumOffset = tmp * (1 + 0.4)
    tmp = .Axis.Left.CalcXSizeValue(.Series(0).asBubble.RadiusValues.Last)
    .Axis.Bottom.MaximumOffset = tmp * (1 + 0.4)
    tmp = .Axis.Left.CalcXSizeValue(.Series(0).asBubble.RadiusValues.First)
    .Axis.Left.MinimumOffset = tmp * (1 + 0.4)
    
    .Axis.Bottom.Labels.Style = talValue
    .Zoom.Enable = False
  End With

That works great.

But, if I uncomment this line:

Code: Select all

.Canvas.UseAntiAlias = True
Clicking doesn't work. Two or three bubbles will show a label on click, but it's the wrong label. The other bubbles don't seem to react to the click at all.

Is this a known bug?

How can I have antialiasing on without messing up the Click?

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 14, 2007 9:44 am

Hi Productivity Guy,

Which TeeChart version are you using? I've checked that in the code below OnClickSeries event fails in v7 but works fine in TeeChart Pro v8 ActiveX.

Code: Select all

Private Sub Form_Load()
  With TChart1
    .Aspect.View3D = False
    .Canvas.UseAntiAlias = True
    .AddSeries scBubble
   
    For i = 0 To 10
        .Series(0).asBubble.AddBubble i, i, 1, "Bubble " & CStr(i), clTeeColor
    Next i
  End With
End Sub

Private Sub TChart1_OnClickSeries(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
    TChart1.Header.Text.Clear
    TChart1.Header.Text.Add TChart1.Series(SeriesIndex).PointLabel(ValueIndex)
End Sub
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

Productivity Guy
Newbie
Newbie
Posts: 21
Joined: Tue Mar 01, 2005 5:00 am
Location: Spokane, WA
Contact:

Post by Productivity Guy » Wed Nov 14, 2007 6:06 pm

Ahh. Yes, I'm using V7. I'll check to see how much the upgrade is.

EDIT: I've just upgraded. Thanks for your help.

Post Reply