Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
TLC
Newbie
Newbie
Posts: 67
Joined: Mon Apr 08, 2019 12:00 am

Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger

Post by TLC » Tue Oct 29, 2024 6:59 pm

Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger because the kind parameter is never MouseEventKinds.Move. I clicked and dragged on the chart but it never triggered. Only the down and up events fired.

Code: Select all

    protected internal override void MouseEvent( MouseEventKinds kind, MouseEventArgs e, ref Cursor c)
    {
      if (kind != MouseEventKinds.Move || this._iSeries == null)
        return;
Also please change the Change event signature from

Code: Select all

    public event EventHandler Change;
to

Code: Select all

    public event EventHandler<int> Change;
or

Code: Select all

    public event Action<int> Change;
where the int parameter is the current point index.
Visual Studio 2022 versions.7z
(2.83 KiB) Downloaded 94 times

Marc
Site Admin
Site Admin
Posts: 1269
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger

Post by Marc » Mon Nov 04, 2024 8:52 am

Hello,

Apologies for the delay with this reply, we are investigating and will apply a fix for the next update and are checking if any temporary workaround is possible.

Regards,
Marc Meumann
Steema Support

Marc
Site Admin
Site Admin
Posts: 1269
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger

Post by Marc » Mon Nov 04, 2024 9:22 am

...this has been checked for desktop versions (no problems found) but now notice from other posts you have made, that this issue may be related to Xamarin. Is that correct? ..or MAUI? I see your attached file includes Xamarin installation to the IDE.

With thanks.
Regards,
Marc
Steema Support

TLC
Newbie
Newbie
Posts: 67
Joined: Mon Apr 08, 2019 12:00 am

Re: Steema.TeeChart.Tools.NearestPoint Change event doesn't trigger

Post by TLC » Tue Nov 05, 2024 3:19 pm

Yes its on MAUI. THe workaround if found was to do the following:

Code: Select all

    protected override void MouseEvent( MouseEventKinds kind, MouseEventArgs e, ref Cursor c )
    {
        if ( _iSeries is null ) { return; }

        Point point = new(e.X, e.Y);
        int   index = GetNearestPoint( point );
        _viewModel.SetCurrentPointIndex( index );
        base.MouseEvent( kind, e, ref c );
    }

Post Reply