Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Consider the following code:

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
import 'package:intl/intl.dart';

void main() {
runApp(MaterialApp(
home: TestPage(),
));
}

class TestPage extends StatefulWidget {
@override
_TestPageState createState() => _TestPageState();
}

class _TestPageState extends State<TestPage> {
Future future;

@override
void initState() {
super.initState();
future = Future.delayed(Duration(seconds: 1));
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: SfCartesianChart(
series: [
LineSeries<Datum, DateTime>(
dataSource: [
Datum(DateTime(2020, 7, 1), 3),
Datum(DateTime(2020, 7, 2), 1),
Datum(DateTime(2020, 7, 3), 4),
Datum(DateTime(2020, 7, 4), 8),
Datum(DateTime(2020, 7, 5), 5),
Datum(DateTime(2020, 7, 6), 1),
Datum(DateTime(2020, 7, 7), 3),
Datum(DateTime(2020, 7, 8), 7),
Datum(DateTime(2020, 7, 9), 2),
],
xValueMapper: (Datum datum, _) => datum.x,
yValueMapper: (Datum datum, _) => datum.y,
markerSettings: MarkerSettings(
isVisible: true,
),
),
],
primaryXAxis: DateTimeAxis(
dateFormat: DateFormat.Md().add_Hm(),
zoomPosition: 1,
zoomFactor: 0.2,
),
primaryYAxis: NumericAxis(
anchorRangeToVisiblePoints: false,
),
zoomPanBehavior: ZoomPanBehavior(
enablePanning: true,
enablePinching: true,
zoomMode: ZoomMode.x,
),
onZooming: (arg) => print('ZoomFactor: ${arg.previousZoomFactor} --> ${arg.currentZoomFactor}, ZoomPosition: ${arg.previousZoomPosition} --> ${arg.currentZoomPosition}'),
),
);
}
}

class Datum {
DateTime x;
num y;

Datum(this.x, this.y);
}

When user try to zoom out the chart until zoomFactor = 1, the zoomFactor suddenly reset to initial value i.e. 0.2.