Skip to content

[syncfusion_flutter_charts] Chart scroll x #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
weiwill opened this issue Jun 4, 2021 · 2 comments
Closed

[syncfusion_flutter_charts] Chart scroll x #272

weiwill opened this issue Jun 4, 2021 · 2 comments

Comments

@weiwill
Copy link

weiwill commented Jun 4, 2021

Q1: first load chart scroll end,is not start.
Q2: how to show scroll bar on char bottom.

QQ20210605-032959

SfCartesianChart(
    enableAxisAnimation: true,
    primaryXAxis: CategoryAxis(
      labelStyle: TextStyle(fontSize: 20.px),
      maximumLabels: 100,
      autoScrollingDelta: 4,
      majorGridLines: MajorGridLines(width: 0),
      majorTickLines: MajorTickLines(width: 0),
    ),
    primaryYAxis: NumericAxis(
        numberFormat: NumberFormat('##########人'),
        minimum: 1.0,
        majorGridLines: MajorGridLines(
          width: 0,
        )),
    zoomPanBehavior: ZoomPanBehavior(
      enablePanning: true,
    ),
    series: <ChartSeries>[
      // Renders column chart
      ColumnSeries<MapD, String>(
          dataSource: controller.dataSource,
          xValueMapper: (MapD data, _) => data['x'],
          yValueMapper: (MapD data, _) => data['y'],
          pointColorMapper: (Map data, _) => Colors.blue,
          dataLabelSettings: DataLabelSettings(isVisible: true),
          emptyPointSettings: EmptyPointSettings(
              // Mode of empty point
              mode: EmptyPointMode.average)),
    ])
@Dharanipalani
Copy link

Hi @weiwill,

Thanks for the interest in our Flutter charts, we have analyzed your queries and find the responses below.

Query #1 first load chart scroll end,is not start.

We can see from the sample that you are using the auto scrolling function, which by default displays the most recent data in the last, but you can change this by changing the autoScrollingMode attribute to start. The help document can be found below if you need further information.

https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#autoscrollingmode

Query #2 how to show scroll bar on char bottom.

The scroll bar is not currently supported in our charts, but you can get the same behavior using the syncfusion_flutter_sliders package, binding the chart data to this range selector, and using it as a scrolling feature. You can learn more about this in the help document below, and demo samples can be found in the link below.

Help document: https://help.syncfusion.com/flutter/range-selector/drag-mode
Demo: https://flutter.syncfusion.com/#/range-selector/default

Please revert us if you need further assistance on this.

Thanks,
Dharanitharan. P

@weiwill weiwill closed this as completed Jun 9, 2021
@weiwill weiwill reopened this Jun 9, 2021
@weiwill
Copy link
Author

weiwill commented Jun 9, 2021

Thank you for your reply. It's very easy to use

@weiwill weiwill closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants