flutter-examples icon indicating copy to clipboard operation
flutter-examples copied to clipboard

SfCartesianChart - Column width not increasing

Open Akshay2892 opened this issue 2 years ago • 1 comments

Hello, I am using SfCartesianChart to draw column chart in Flutter. In column series I am passing data to draw the chart but I can see width of columns not increasing. Its drawing very thin column line which is barely visible. I am using width property to increase width of column line but its not increasing, What can I do to increasing width ? I am using following code as below -

` series: <ColumnSeries<WeightModel, DateTime>>[ ColumnSeries( animationDelay: 0.0, animationDuration: 0.0, width: widget.weightModelList.length > 5 ? 0.6 : 0.8, spacing: 0.2,

                                borderRadius: const BorderRadius.only(
                                    topLeft: Radius.circular(50),
                                    topRight: Radius.circular(50)),
                                pointColorMapper:(WeightModel weightModel, _) => weightModel.color,
                                dataLabelSettings: const DataLabelSettings(
                                  //color: AppColors.textColor,
                                    isVisible: true,
                                    labelPosition:
                                        ChartDataLabelPosition.outside,
                                    labelAlignment:
                                        ChartDataLabelAlignment.outer),
                                dataSource: widget.weightModelList,
                                xValueMapper:
                                    (WeightModel weightModel, _) =>
                                        weightModel.dateTime,
                                yValueMapper:
                                    (WeightModel weightModel, _) =>
                                        weightModel.weightValue,`
Screenshot 2022-09-28 at 1 56 01 PM

Thanks, Akshay

Akshay2892 avatar Sep 28 '22 08:09 Akshay2892

Hi @Akshay2892,

Greetings from Syncfusion. We have checked your query and we kindly request you to share us with more information on how you are passing data for your column chart such as whether you are assigning static data points or adding data points in real-time for the column chart and also if you are using live data, kindly let us know whether you are using setState or using updateDataSource method to add or update the chart data. Kindly please revert us with the requested information in detail and if possible, kindly try to replicate the reported issue in the below-attached sample and revert us with it so that it will help us assist you in a better way.

Sample: sample.zip

Regards, Sriram Kiran

SriramKiranSenthilkumar avatar Sep 30 '22 09:09 SriramKiranSenthilkumar