import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
void main() async {
runApp(
MaterialApp(
home: TestChart(),
),
);
}
class TestChart extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Expanded(
child: SfCartesianChart(
primaryXAxis: DateTimeAxis(
initialVisibleMinimum: DateTime(2001),
initialVisibleMaximum: DateTime(2002),
interval: 1,
intervalType: DateTimeIntervalType.months,
dateFormat: DateFormat.Md(),
),
zoomPanBehavior: ZoomPanBehavior(
enablePanning: true,
),
series: [
ColumnSeries<num, DateTime>(
xValueMapper: (num value, int index) => DateTime(2000, index,),
yValueMapper: (num value, int index) => index,
dataSource: List<num>.filled(80, 18),
)
],
),
),
Expanded(
child: SfCartesianChart(
primaryXAxis: DateTimeAxis(
initialVisibleMinimum: DateTime(2000, 1),
initialVisibleMaximum: DateTime(2000, 2),
interval: 1,
intervalType: DateTimeIntervalType.days,
),
zoomPanBehavior: ZoomPanBehavior(
enablePanning: true,
),
series: [
ColumnSeries<num, DateTime>(
xValueMapper: (num value, int index) => DateTime(2000, 1, 1 + index),
yValueMapper: (num value, int index) => index,
dataSource: List<num>.filled(80, 18),
)
],
),
),
],
);
}
}
Bug description
When panning a chart with fixed interval type and one value for each interval step, the x axis moves along with the values as expected if the interval is day or lower. However, at the levels month and year, the x axis updates the displayed ticks and changes the day, providing the feeling of the ticks "standing still" and only moving the columns, especially if the (default) dateformat does not include the day.
It would be nice to always have the smooth version like day and below.
Syncfusion Flutter Charts are at version 27.1.50
Steps to reproduce
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Weird panning on month and above:

Smooth panning on day and below:

Stack Traces
Stack Traces
Not applicable
On which target platforms have you observed this bug?
Android, Web
Flutter Doctor output
Doctor output