Maui Click, MouseEnter nor MouseLeave events are NOT invoked

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
McSaverCharting
Newbie
Newbie
Posts: 15
Joined: Mon Jan 29, 2024 12:00 am

Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by McSaverCharting » Mon Jan 29, 2024 6:13 pm

Problems:
o Series.Click
o Series.MouseEnter
o Series.MouseLeave

Series:
Activityguage
Area
Bar Works only on Windows when the chart only contain no other series types
Bubble
Candle
Contour
Donut
Fastline
Gantt
Highly
Histogram
Horizarea
Horizbar
Horizline
Isosurface
Line Works only on Windows when the chart only contain no other series types
Pie
Point
Polargrid
Pyramid
Shape
Surface
TagCloud
Tower
Veriz
Vector3d
Volume
Volumepipe
Waterfall
Windrose

I have taken your TeeChartMAUIDemos solutions added some code to demonstrate these events never get called, for the Series listed above.

Load solution and search for the following: Added Code

Code behind View files modified:
AllCharts, AreaChart, BarChart, BuubleChart, CandleChart, CircleGaugeChart,
DonutChart, LineChart, MapChart

Approach: 1) Code as added to the bottom of each constructor, like:

bar.Click += Bar_Click;
bar.MouseEnter += Bar_MouseEnter;
bar.MouseLeave += Bar_MouseLeave;

2) Added a region contained new methods that were created, Like:

private void Bar_Click( object sender, MouseEventArg e )
{
throw new NotImplemented();
}
private void Bar_MouseEnter( object sender, EventArg e )
{
throw new NotImplemented();
}
private void Bar_MouseLeave object sender, EventArg e )
{
throw new NotImplemented();
}


Test Environment:
PC: Windows11 Operating System, Visual Studio 2022
Updated all NU get Packages in the solution to latest version as of 01/27/2023

Debugged: Window Machine, Android Emulators, IOS Simulators


Failures:
1) MouseEnter nor MouseLeave events were NOT invoked
when running any of the Debug configurations listed above

2) Click events when Android or IOS Configs
o. NOT invoked for all series listed above

Click events when running under Window Machine Config
o. Invoked when testing
a) BarChart
b) LineChart
c) CircularGaugeChart

o. NOT invoked for all series listed above when tested in the AllCharts
NOTE: Line, Bar also fail to invoke, seem to only work
when event handlers are not added for other series types

We ported our application from using your WPF version to Maui Version. We are hoping to release the Maui version next month. Hoping you can help.

Thanks,89o

Steven McCabe
[email protected]
(303) 903-8654
Attachments
ChangedFiles.xaml.zip
Contains the changed files listed above
(9.99 KiB) Downloaded 3316 times

McSaverCharting
Newbie
Newbie
Posts: 15
Joined: Mon Jan 29, 2024 12:00 am

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by McSaverCharting » Tue Feb 13, 2024 10:44 am

Hello Steema,

Has anyone had a chance to look into this issue?

Thank you.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by Pep » Tue Feb 13, 2024 1:28 pm

Hello,
let me check the example and back to you asap.

McSaverCharting
Newbie
Newbie
Posts: 15
Joined: Mon Jan 29, 2024 12:00 am

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by McSaverCharting » Wed Feb 21, 2024 1:25 pm

The latest release(6.2024.2.19) solved most of the issues, in this post, but here are a few of the remaining:

1). LineChart.xaml. cs. Line Double Click does not work.
line.DblClick += Line_DblClick;

2). AllCharts.xaml.cs. Add any of the following :
a). pyramid.Click += Pyramid_Click
b). pyramid.MouseEnter += Pyramid_MouseEnter;
c). pyramid.MouseLeave += Pyramid_MouseLeave;

Shows that the var pyramid = new Pyramid(tChart13.Chart);
has been disposed incorrectly. Some How!
You can see this by cursor-ing over or clicking on the Pyramid.

I was not able to verify changes for the following items work:
1). Volumepipe
2). Vector3d
3). Isosurface_Click

I currently have only tested in Windows.

It would be helpful to update the AllCharts.xaml to add the Series name to the title of each chart. Like. TeeChart - Bar


I noticed the Maui version does not support the following methods on TChart object:
1). protected virtual void OnMouseUp(MouseButtonEventArgs e)
2). protected virtual void OnMouseDown(MouseButtonEventArgs e)
Without these methods, it is impossible to know when a Drag has started and finished.
If I am missing something, please let me know.


The following methods are not supported under Maui but where under the WPF version on TChart object. I understand the following have been replaced by the Hover Events, but why change your approach? It would be nice to have a document stating these API changes and decisions as to why a different approach was taken.
1) protected virtual void OnMouseLeave(MouseEventArgs e)
2) protected virtual void OnMouseEnter(MouseEventArgs e)
3). protected virtual void OnMouseMove(object? sender, TouchEventArgs e)

Lastly, when an issue has been fixed and released, it would be great if you could notify the creator of that issue via email of that fact.

McSaverCharting
Newbie
Newbie
Posts: 15
Joined: Mon Jan 29, 2024 12:00 am

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by McSaverCharting » Thu Feb 22, 2024 12:36 pm

Additionally, If a Bar and/or TagCloud is instantiated, MouseEnter/MouseLeave Events are added and the series is not filled with any Data, the empty chart will appear, but as soon as you cursor over either of these two charts, the application will CRASH. Please note, that this will only happen for these two series, all other series in AllCharts.xaml.cs work fine. Please find attached a new version of AllCharts.xaml.cs. The new version of AllCharts.xaml,cs has updated each chart’s title to display its Series name to assist in knowing which chart blows up. The calls to FillSampleValues() for each chart have been commented to demonstrate the failure.
Attachments
AllCharts.xaml.cs.zip
New version demo CRASHES
(3.17 KiB) Downloaded 3234 times

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by Pep » Thu Feb 22, 2024 1:51 pm

Hello,
ok, just checking all. Some issues already fixed now and working on the other. Will back to you with new nuget version asap.

Thanks for all your comments and examples.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Maui Click, MouseEnter nor MouseLeave events are NOT invoked

Post by Pep » Thu Feb 22, 2024 7:05 pm

Hello,

answering to some of issues and comments you sent to us.
Additionally, If a Bar and/or TagCloud is instantiated, MouseEnter/MouseLeave Events are added and the series is not filled with any Data, the empty chart will appear, but as soon as you cursor over either of these two charts, the application will CRASH.
This has already been fixed and will be included into the new nuget version that will be uploaded shortly.
Lastly, when an issue has been fixed and released, it would be great if you could notify the creator of that issue via email of that fact.
Yes, we normally add all the bugs and wishes [ur="http://bugs.teechart.net/"]here on our bug list[/url]. Users also can add issues and new feature requests to be fixed/considered, in this way once the bug/wish status changes user receives an email notification.
1). LineChart.xaml. cs. Line Double Click does not work.
line.DblClick += Line_DblClick;
Double click was not implemneted in MAUI, now it has been added and will be available into the next nuget version.

2). AllCharts.xaml.cs. Add any of the following :
a). pyramid.Click += Pyramid_Click
b). pyramid.MouseEnter += Pyramid_MouseEnter;
c). pyramid.MouseLeave += Pyramid_MouseLeave;

Shows that the var pyramid = new Pyramid(tChart13.Chart);
has been disposed incorrectly. Some How!
You can see this by cursor-ing over or clicking on the Pyramid.
We've fixed the problem about mouse enter having empty pyramid series, but still pending to fix the returned point index on click. It has been added as a bug
I was not able to verify changes for the following items work:
1). Volumepipe
2). Vector3d
3). Isosurface_Click
These has been added as bugs on our bug list:
http://bugs.teechart.net/show_bug.cgi?id=2676
http://bugs.teechart.net/show_bug.cgi?id=2677
http://bugs.teechart.net/show_bug.cgi?id=2678
I noticed the Maui version does not support the following methods on TChart object:
1). protected virtual void OnMouseUp(MouseButtonEventArgs e)
2). protected virtual void OnMouseDown(MouseButtonEventArgs e)
Without these methods, it is impossible to know when a Drag has started and finished.
If I am missing something, please let me know.
Yes, in MAUI we have startInteraction and endInteraction events.

Post Reply