Skip to content

Commit

Permalink
FLUT-913002-[others][flutter]: optimized the code and done changes in…
Browse files Browse the repository at this point in the history
… read me file
  • Loading branch information
KompelliSravanSyncfusion committed Nov 13, 2024
1 parent e90502d commit 4cd13b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to synchronize crosshair in multiple Flutter SfCartesianChart
# How to synchronize crosshair in multiple Flutter SfCartesianChart?

This repository contains a sample to synchronize crosshair in multiple cartesian charts on a [Syncfusion Flutter Chart](https://help.syncfusion.com/flutter/cartesian-charts/getting-started) widget.

Expand All @@ -7,7 +7,7 @@ Please refer the KB through this [link](https://support.syncfusion.com/agent/kb/
## Syncfusion controls:

This project used the following Syncfusion widget(s):
* [SfCircularChart](https://www.syncfusion.com/flutter-widgets/flutter-charts)
* [SfCartesianChart](https://www.syncfusion.com/flutter-widgets/flutter-charts)

## Supported platforms

Expand Down
9 changes: 1 addition & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ class FirstChartState extends State<FirstChart> {
void initState() {
super.initState();
_chartData = _getChartData();
_crosshair1 = CrosshairBehavior(
enable: true,
activationMode: ActivationMode.singleTap,
);
}

void show(Offset position) {
Expand Down Expand Up @@ -165,10 +161,6 @@ class SecondChartState extends State<SecondChart> {
void initState() {
super.initState();
_chartData = _getChartData();
_crosshair2 = CrosshairBehavior(
enable: true,
activationMode: ActivationMode.singleTap,
);
}

void show(Offset position) {
Expand Down Expand Up @@ -212,6 +204,7 @@ class SecondChartState extends State<SecondChart> {

@override
void dispose() {
_chartData!.clear();
_secondChartController = null;
super.dispose();
}
Expand Down

0 comments on commit 4cd13b1

Please sign in to comment.