Padding between plot area and chart

Hi there!

I am currently implementing SfCartestianChart into my Flutter app and so far I'm pretty successful doing so!

There is just one some small thing I can't seem to find a solution for.

Here are two screenshots of the chart:

Screenshot 1:

IMG_2299.jpg


Screenshot 2 (plot area and chart backgrounds highlighted to visualize gap):

IMG_2298.jpg


I want the spacing between plot area and left hand side (highlighted red) to be gone.

How can I accomplish that?

Here is my code:


SfCartesianChart(
   margin: EdgeInsets.only(
       bottom: 8.0,
       left: 0,
       right: 0,
       top: 0,
   ),
   plotAreaBorderWidth: 0,
   primaryXAxis: NumericAxis(
       isVisible: false,
   ),
   primaryYAxis: NumericAxis(
       labelPosition: ChartDataLabelPosition.inside,
       labelAlignment: LabelAlignment.end,
       edgeLabelPlacement: EdgeLabelPlacement.shift,
       maximumLabels: 3,
       maximum: maxTemp.temperature + 3,
       minimum: minTemp.temperature - 3,
       majorGridLines: MajorGridLines(
           color: Colors.white60,
       ),
       axisLine: AxisLine(
           color: Colors.white,
           width: 0,
       ),
       majorTickLines: MajorTickLines(
           size: 0,
           width: 0,
       ),
       tickPosition: TickPosition.inside,
       labelStyle: Theme.of(context)
           .primaryTextTheme
           .merge(
                TextTheme(
                    bodyText1: TextStyle(
                       color: Colors.white,
                       fontSize: 11.0,
                    ),
                ),
            )
            .bodyText1,
       ),
   series: [
       SplineRangeAreaSeries(
           dataSource: hours,
           xValueMapper: ((data, index) => index.toDouble()),
           highValueMapper: ((data, index) => data.temperature),
           lowValueMapper: ((data, index) => data.temperature),
           borderWidth: 3,
           borderGradient: LinearGradient(
               colors: hours.map((e) => e.temperatureColor).toList(),
           ),
       ),
   ],
)

5 Replies 1 reply marked as answer

YG Yuvaraj Gajaraj Syncfusion Team October 1, 2021 03:13 PM UTC

Hi Julian Meier 
 
Greetings from Syncfusion. We have analyzed you query and that the reported scenario can be replicated at our end. Here we would like to inform you that we have added the padding before the axis line, and this is our default behavior. By considering your request, we will consider this as a behavior change and provide a fix at next weekly patch release which is expected to be rolled out by second week of October. We appreciate your patience until then. 
 
Regards 
Yuvaraj 



SK Sriram Kiran Senthilkumar Syncfusion Team October 4, 2021 11:45 AM UTC

Hi Julian Meier, 
 
Please find the feedback link below for the requested behavior change and you can also track the status of the bug fix using it.  
 
Regards, 
Sriram Kiran 



JM Julian Meier October 5, 2021 11:42 AM UTC

Thanks a lot for the quick reply and fix! :)



YG Yuvaraj Gajaraj Syncfusion Team October 6, 2021 03:15 PM UTC

Hi Julian, 
 
As stated earlier, we will include the fix for the reported scenario next weekly patch release which is expected to be rolled out by second week of October 2021. 
 
Thanks, 
Yuvaraj. 



YG Yuvaraj Gajaraj Syncfusion Team October 12, 2021 04:42 PM UTC

Hi Julian, 
  
The reported scenario has been fixed and included in the weekly patch release. To resolve the reported issue, kindly upgrade the chart to latest version 
  
 
Regards, 
Yuvaraj. 


Marked as answer
Loader.
Up arrow icon