highcharts / highcharts/highcharts_flutter

HighchartsLegendOptions: Disable legend item click

Open
#82 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dart
Stars
12
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### Expected behaviour

Trying Disable legend "itemClick" event.

According to the docs `event.preventDefault()` is how you do it in the js world

### Actual behaviour

I cant figure out how to do it in the flutter lib. i can console log event which is a MouseEvent but it doesnt disable it, tried quite a few combinations of:

```
itemClick: HighchartsCallback((events) => false, "event.preventDefault()"),
```

### Version

1.2.0

### Affected devices/platforms

_No response_

### Relevant log output

```shell

```

### Relevant code snippet

```dart

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with HighchartsLegendOptions.itemClick in a Flutter example, then inspect how the MouseEvent and HighchartsCallback are passed to the JavaScript chart. Compare the callback behavior with Highcharts' event.preventDefault() documentation; done means a legend item click no longer performs its default action when the callback is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.