Unable to Scroll X-Axis in FL-Chart

60 Views Asked by At

I'm using the FL Chart package to create a chart that displays budget titles on the X-axis and ranges from 0 to 100 on the Y-axis. The problem is that I can't scroll on the X-axis when there are more than four data items. Any suggestions on how to enable X-axis scrolling in the FL Chart when dealing with a larger number of data points?

enter image description here

I tried this and doesn't work fine:

Container(
                              alignment: Alignment.center,
                              width: double.infinity,
                              child: SingleChildScrollView(
                                scrollDirection: Axis.horizontal,
                                child: Padding(
                                  padding: const EdgeInsets.all(8.0),
                                  child: Container(
                                    color: Colors.green,
                                    width: 1000,
                                    height: 250,
                                    child: CustomBarChartWidget(
                                        data: FakeData.barChartFakeData),
                                  ),
                                ),
                              ),
                            ),
0

There are 0 best solutions below