syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.44k stars 672 forks source link

Chart zooming becomes very slow(not laggy) during deep zoom #1818

Open temeddix opened 1 month ago

temeddix commented 1 month ago

Bug description

Zooming becomes very slow(not laggy) during deep zoom. It feels quite frustrating when you want to see individual candles or data. In my humble opinion, the zoom factor per scroll should remain the same, whether the zoom level is high or not.

The speed is okay on shallow zoom level(1 to 0.1), but becomes very slow after that(0.1 to 0.0001).

Steps to reproduce

Simpliy zoom into SfCartesianChart deeper and deeper.

Code sample

SfCartesianChart(
  primaryXAxis: const DateTimeAxis(),
  primaryYAxis: const NumericAxis(
    anchorRangeToVisiblePoints: true,
    rangePadding: ChartRangePadding.round,
  ),
  series: <CartesianSeries<GraphPoint, DateTime>>[
    CandleSeries<GraphPoint, DateTime>(
      dataSource: points,
      xValueMapper: (data, _) =>
          DateTime.fromMillisecondsSinceEpoch(
        data.x.toInt(),
      ),
      openValueMapper: (data, _) => data.yOpen,
      highValueMapper: (data, _) => data.yHigh,
      lowValueMapper: (data, _) => data.yLow,
      closeValueMapper: (data, _) => data.yClose,
    )
  ],
  zoomPanBehavior: ZoomPanBehavior(
    zoomMode: ZoomMode.x,
    enablePinching: true,
    enablePanning: true,
    enableMouseWheelZooming: true,
    maximumZoomLevel: 0.0001,
  ),
)

Screenshots or Video

https://github.com/syncfusion/flutter-widgets/assets/66480156/c361c84d-0a59-4c4a-8858-8f52b43ea835

Stack Traces

(This is not an error)

On which target platforms have you observed this bug?

Windows

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.22631.3447], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.5)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.88.1)
[√] Connected device (3 available)
[√] Network resources

• No issues found!
PreethikaSelvam commented 3 weeks ago

Hi @temeddix,

We have analyzed your query and would like to inform you that this is current behavior. However, we have understood your requirement and have considered it as a feature improvement and logged a feature request for 'consistent zoom speed during deep zooming' in our feedback portal.

We will prioritize the features of every release based on demand and priority. So, this feature will be available in any of our upcoming releases. You can also track the status of the feature with the feedback below.

FR Link, https://www.syncfusion.com/feedback/53914/provide-consistent-zoom-speed

Regards,

Preethika Selvam.