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:
Screenshot 2 (plot area and chart backgrounds highlighted to visualize gap):
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(), ), ), ], )
Thanks a lot for the quick reply and fix! :)