can anyone help me ?
must be like this https://prnt.sc/26m2aie
but when you do it up and down on the page
happens like this
https://prnt.sc/26m2a84
main page
return Scaffold(
appBar: AppBar(
backgroundColor: const Color(0xff30373e),
title:
const Text("Yönetici Özeti", style: TextStyle(color: Colors.white)),
),
body: ListView(
children: <Widget>[
Expanded(
child: Card(
color: Colors.white,
child: SpesificConsumptionChart(),
shadowColor: Colors.grey.withOpacity(0.5),
elevation: 8,
margin: const EdgeInsets.all(20),
shape: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
),
),
Chart page
SfCartesianChart_buildSpesificConsumptionChart(BuildContextcontext) {
returnSfCartesianChart(
zoomPanBehavior: _zoomPanBehaviorLine,
trackballBehavior: _trackballBehaviorLine,
// Enables the legend
legend: Legend(
isVisible: true,
position: LegendPosition.top,
),
title: ChartTitle(
text: spesificConsumptionDataTitle,
backgroundColor: Colors.white,
borderWidth: 2,
// Aligns the chart title to left
alignment: ChartAlignment.center,
textStyle: constTextStyle(
color: Colors.black,
fontFamily: 'Roboto',
fontSize: 14,
)),
// Initialize category axis
primaryXAxis: CategoryAxis(),
primaryYAxis: NumericAxis(),
series: <ChartSeries>[
// Initialize line series
SplineSeries<_SpesificConsumptionData, String>(
dataSource: spesificConsumptionData,
name: spesificConsumptionDataLegendTitle,
xValueMapper: (_SpesificConsumptionDatadata, _) => data.x,
yValueMapper: (_SpesificConsumptionDatadata, _) => data.y,
)
]);
}