How do I get the barchart to space evenly with more than one series?

Hi.

I am new to Flutter and using Syncfusion control. I created a bar chart with 2 series but new the 2 bars are to the edges of the chart area and not spaced out evenly. How do I get it to space correctly?




3 Replies

SK Sriram Kiran Senthilkumar Syncfusion Team September 22, 2021 02:12 PM UTC

Hi Jaco, 

Greetings from Syncfusion. 

We have analyzed your scenario with the provided information at our end and we would like to let you know that if there are more than one Rect type series (column, bar types etc.,) are plotted in the chart, to avoid overlapping of data points, we have a feature to place the series type side by side in the chart to avoid overlapping of series data points. This can be controlled with the help of enableSideBySideSeriesPlacement Boolean API available in SfCartesianChart widget and its value defaults to true. 
 For you case, we recommend you that you can set the enableSideBySideSeriesPlacement property to false to disable this feature so that the bar series data points will get rendered based on the available space. Please refer the code snippet below for reference. 
Widget build(BuildContext context) { 
   return Container( 
       child: SfCartesianChart( 
          enableSideBySideSeriesPlacement: false 
       )); 

Screenshot: 
 
We have also attached the user guide link below for further reference. 

Please check and get back to us if you require further assistance. 

Regards, 
Sriram Kiran 



JA Jaco September 22, 2021 03:43 PM UTC

Thank you.



SK Sriram Kiran Senthilkumar Syncfusion Team September 23, 2021 01:19 PM UTC

Hi Jaco, 
  
Most welcome. Please get back to us if you require further assistance. We are always happy in assisting you. 
  
Regards, 
Sriram Kiran 


Loader.
Up arrow icon