From 44b9a7282cad42eef6d9cf157c36c097d58bd132 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Wed, 8 Jul 2026 15:45:24 +0300 Subject: [PATCH] V4-57566 bug fixes. --- .../LineChartCurvedBloodPressure.dart | 84 ++++++++++++------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 4d36c135..59303bb0 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -97,7 +97,7 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { Container( width: 16, height: 16, - decoration: containerRadius(Color(0xFF14384B), 100), + decoration: containerRadius(Color(0xFFD02127), 100), ), SizedBox( width: 5, @@ -144,8 +144,20 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + gridData: FlGridData(show: true, drawVerticalLine: false, drawHorizontalLine: true, verticalInterval: 14), titlesData: FlTitlesData( + rightTitles: const AxisTitles( + sideTitles: SideTitles( + reservedSize: 0, + showTitles: false, + ), + ), + topTitles: const AxisTitles( + sideTitles: SideTitles( + reservedSize: 0, + showTitles: false, + ), + ), bottomTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, @@ -154,38 +166,50 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { getTitlesWidget: (value, meta) { if (timeSeries1!.length < 15) { if (timeSeries1!.length > value.toInt()) { - return Text( - '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', - style: TextStyle( - color: Colors.black, - fontSize: 10, + return Padding( + padding: const EdgeInsets.all(4.0), + child: Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: TextStyle( + color: Colors.black, + fontSize: 8, + ), ), ); } else return Text(""); } else { if (value.toInt() == 0) - return Text( - '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', - style: TextStyle( - color: Colors.black, - fontSize: 10, + return Padding( + padding: const EdgeInsets.all(4.0), + child: Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: TextStyle( + color: Colors.black, + fontSize: 8, + ), ), ); if (value.toInt() == timeSeries1!.length - 1) - return Text( - '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', - style: TextStyle( - color: Colors.black, - fontSize: 10, + return Padding( + padding: const EdgeInsets.all(4.0), + child:Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: TextStyle( + color: Colors.black, + fontSize: 8, + ), ), ); if (xAxixs.contains(value.toInt())) { - return Text( - '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', - style: TextStyle( - color: Colors.black, - fontSize: 10, + return Padding( + padding: const EdgeInsets.all(4.0), + child: Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: TextStyle( + color: Colors.black, + fontSize: 8, + ), ), ); } @@ -197,14 +221,10 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { leftTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, - interval: getMaxY() - getMinY() <= 500 - ? 50 - : getMaxY() - getMinY() <= 1000 - ? 100 - : 200, - reservedSize: 12, + reservedSize: getMaxY()>99? 40 : 30, ), - )), + ) + ), borderData: FlBorderData( show: true, border: const Border( @@ -276,7 +296,7 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { spots: spots, isCurved: true, color: Colors.red, - barWidth: 1.5, + barWidth: 2, isStrokeCapRound: true, dotData: FlDotData( show: false, @@ -289,7 +309,7 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { spots: spots2, isCurved: true, color: Theme.of(context).primaryColor, - barWidth: 1.5, + barWidth: 2, isStrokeCapRound: true, dotData: FlDotData( show: false, @@ -308,7 +328,7 @@ class LineChartCurvedBloodPressureNew extends StatelessWidget { border: Border.all( width: 1, // color: background // <--- border width here - ), + ), borderRadius: BorderRadius.circular(radius), ); }