From 93dba4cbebbf991ff03ba8a64b5ef79fb078c3bf Mon Sep 17 00:00:00 2001 From: mosazaid Date: Tue, 6 Apr 2021 10:00:34 +0300 Subject: [PATCH 1/2] vital sign fix bug --- .../profile/vital_sign/LineChartCurved.dart | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index e87a7a39..105c57e9 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -115,16 +115,30 @@ class LineChartCurved extends StatelessWidget { //rotateAngle:-65, margin: 22, getTitles: (value) { - if (timeSeries.length > value.toInt()) { - DateTime dateTime = timeSeries[value.toInt()].time; - if (isDatesSameYear) { - return monthFormat.format(dateTime); + if (timeSeries.length < 15) { + if (timeSeries.length > value.toInt()) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } } else { - return yearFormat.format(dateTime); + return ''; } } else { - return ''; + if (value.toInt() == 0 || + value.toInt() == timeSeries.length - 1 || + xAxixs.contains(value.toInt())) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } + } } + /*if (timeSeries.length < 15) { if (timeSeries.length > value.toInt()) { DateTime dateTime = timeSeries[value.toInt()].time; @@ -232,7 +246,7 @@ class LineChartCurved extends StatelessWidget { final LineChartBarData lineChartBarData1 = LineChartBarData( spots: spots, isCurved: true, - colors: [Colors.red]/*[Theme.of(context).primaryColor]*/, + colors: [Colors.red] /*[Theme.of(context).primaryColor]*/, barWidth: 5, isStrokeCapRound: true, dotData: FlDotData( From 00975a2dddccfd8a580a56571673f0310448b934 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Tue, 6 Apr 2021 11:03:21 +0300 Subject: [PATCH 2/2] fix arrival patient problem --- lib/config/config.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 538aed37..59929f45 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -121,7 +121,7 @@ const GET_DASHBOARD = const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; const ARRIVED_PATIENT_URL = - 'Services/DoctorApplication.svc/REST/PatientArrivalList​'; + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';