imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.71k stars 1.73k forks source link

fixedLeftColumns is not reflecting using DataTable2 (Tested on web) #1705

Open Haris2v opened 2 months ago

Haris2v commented 2 months ago

Describe the bug I have set fixedLeftColumns to 2, which should make 2 most left columns sticky. But its not working. Even tried with 1 and other number and no result. Although fixedTopRows seems to be working fine.

To Reproduce Here is the example code to reproduce.

DataTable2(
          columnSpacing: 12,
          horizontalMargin: 12,
          lmRatio: 2.5,
          fixedLeftColumns: 2,
          isHorizontalScrollBarVisible: true,
          columns: [
            DataColumn2(size: ColumnSize.S, label: BodyLargeText('Index')),
            DataColumn2(size: ColumnSize.L, label: BodyLargeText('Name')),
            DataColumn2(size: ColumnSize.L, label: BodyLargeText('Email')),
          ],
          rows: List<DataRow>.generate(
              5,
              (index) => DataRow(cells: [
                    DataCell(BodyLargeText('${index+1}')),
                    DataCell(BodyLargeText('Name ${index+1}')),
                    DataCell(BodyLargeText('Email ${index+1}')),
                  ])),
        ),

Screenshots

Versions fl_chart version: fl_chart: ^0.68.0

Flutter doctor

[✓] Flutter (Channel stable, 3.19.0, on macOS 14.5 23F79 darwin-arm64, locale en-US) [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.3) [✓] VS Code (version 1.90.0) [✓] Connected device (4 available) [✓] Network resources

imaNNeo commented 1 month ago

Are you sure your issue is related to fl_chart? I couldn't understand

Haris2v commented 1 month ago

@imaNNeo Have you tried to reproduce this issue or check whats happening there ?

imaNNeo commented 1 month ago

No, because it is not a reproducible code. A reproducible code is a code that I can just run in my main.dart file, What is DataTable2? What is DataRow? We don't have these concepts in the fl_chart