Page 1 of 1

onmouseleaveseries event bug?

Posted: Mon May 05, 2008 8:59 am
by 15048895
hi experts,

Onmouseleaveseries event occurs when moving cursor over one barseries
and just a few wide bar visible.
Is it a bug?

env:
XP SP2
VFP SP1

thanks:
Tamás Handari


the sample code:


Acti Scree
Clea

oparent=Createobject('parentwindow')
With oparent

.AddObject('chart','olechart')
With .chart
.addseries(1)&&barseries
With .series(0)
.Add(2,'first',255)
.Add(1,'second',255)
.Add(3,'third',255)
.Add(2,'fourth',255)
.Add(3,'fifth',255)
.Add(3,'sixth',255)
.Marks.Visible=.F.
With .asBar
.BarWidthPercent=100
.OffsetPercent=0
.multibar=0
Endwith
Endwith
With .axis.Bottom
.Automatic=.F.
.Automaticminimum= .F.
.Automaticmaximum= .F.
.maximum=6
.minimum=1
.labels.Separation=1
.minortickcount=0
Endwith
.Aspect.View3D=.F.
.Visible=.T.
Endwith

.AddObject('lbl','label')
With .lbl
.Left=210
.Width=250
.Height=90
.FontSize=12
.WordWrap=.T.
.Caption='1: move mouse over the series horizontally'+Chr(13)+Chr(10)+;
'2: onmouseleaveseries() event occurs when move from one bar to another'
.Visible=.T.
Endwith
.Show
Endwith
Read Events

Return



***class
***********

Define Class parentwindow As Form
Left=200
Width=600
Height=500
AllowOutput=.F.

Proc Unload
Clea Events
Endproc
Enddefine

Define Class olechart As OleControl
OleClass='TeeChart.TChart.8'
Width=600
Height=360
Top=140

Proc onmouseleaveseries
Lparameters seriesindex
?'onmouseleaveseries event'
Wait ' onmouseleaveseries event ' Window At 3,20 Timeout .6
Endproc

Enddefine

Posted: Mon May 05, 2008 9:59 am
by narcis
Hi Tamás,

I'm not able to reproduce the problem here using TeeChart Pro v8.0.0.3 ActiveX and the code below. Could you please modify the code or send us a simple example project we can run "as-is" to reproduce the problem here and let us know the TeeChart version you are using?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Code: Select all

Private Sub Form_Load()
    TeeCommander1.Chart = TChart1
    
    With TChart1
       .AddSeries scBar

        With .Series(0)
            .Add 2, "first", 255
            .Add 1, "second", 255
            .Add 3, "third", 255
            .Add 2, "fourth", 255
            .Add 3, "fifth", 255
            .Add 3, "sixth", 255
            .Marks.Visible = False
            
            With .asBar
                .BarWidthPercent = 100
                .OffsetPercent = 0
                .MultiBar = 0
            End With
            
        End With
        
        With .Axis.Bottom
            .Automatic = False
            .AutomaticMinimum = False
            .AutomaticMaximum = False
            .Maximum = 6
            .Minimum = 1
            .Labels.Separation = 1
            .MinorTickCount = 0
        End With
        .Aspect.View3D = False
        .Visible = True
    End With
    
End Sub

Private Sub TChart1_OnMouseEnterSeries(ByVal SeriesIndex As Long)
    Caption = "Mouse entered series"
End Sub

Private Sub TChart1_OnMouseLeaveSeries(ByVal SeriesIndex As Long)
    Caption = "Mouse left series"
End Sub

Posted: Mon May 05, 2008 10:14 am
by 15048895
Hi Narcís,

The sample code is written in visual foxpro 9.0.
Can You test in visual foxpro 9.0 environment?
If so, just copy the sample code below in a foxpro .prg file and run it.


I think one thing missed from your VB code:
it is important, that bars have to be wide

Posted: Mon May 05, 2008 10:19 am
by 15048895
>let us know the TeeChart version you are using?

I bought ocx two weeks ago

8.0.0.3

Posted: Mon May 05, 2008 11:11 am
by yeray
Hi

Excuse us, we haven't understood your problem. Now we reproduced the issue here and added it to the wish list to be fixed in further releases (TV52013029). It seems that when you have a bar series with BarwidthPercent at 100, and bottom axis minimum and maximum different from their defaults, MouseEnter and MouseLeave events don't work as expected.

Posted: Mon May 05, 2008 11:37 am
by 15048895
Yeray,

the same problem with paging:

when bar series with BarwidthPercent at 100, and bottom axis minimum and maximum different from their defaults,
paging does not work nor with code, nor with PageNavigator object

test it please ! (or I can send you a test foxpro prg)

thanks:
Tamás Handari