SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Please note! These examples are new to SciChart Mobile v3 release! SciChart iOS & Android ship with Xamarin.iOS and Xamarin.Android bindings around our native iOS & Android Chart controls, allowing you to create fast & feature rich charts to your Xamarin applications. We include ~90 native iOS examples and 90 Android examples, but now also ~60 Xamarin Chart Examples to help you get started with SciChart. You can download the source for our Xamarin Chart Examples from Github, or browse the source code below.
The Vital Signs demo showcases how to use SciChart Charts in a medical context with Xamarin.Android and Xamarin.iOS.
This demo demonstrates how to create cross platform applications with Xamarin Native bindings. Here you can see four channels of data simulated, showing how real-time, high performance ECG/EKG charts & graphs can be drawn to monitor blood pressure, volumetric flow and SPO2 blood oxygen enabling your creation of medical apps for an Android phone, Embedded systems or iOS devices, including iPhones / iPads.
SciChart helps you shortcut development of medical applications by providing rich, real time, high performance & reliable Xamarin Native charts for use in Vital-Signs monitors, blood pressure monitors, Electro Cardiogram, medical Ventilators, patient monitors, digital stethoscopes and more.
If you are creating an app that will run on both Android and iOS, that needs to visualize body temperature, pulse rate, respiration rate, blood pressure, or similar, choose SciChart Xamarin.iOS and Xamarin.Android to shortcut your development time & get to market faster with our well-tested, reliable Chart library.
The C#/Xamarin.iOS/Xamarin.Android source code for the Xamarin Vital Signs ECG/EKG Medical Demo example is included below (Scroll down!).
Did you know you can also view the source code from one of the following sources as well?
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="12dp"
tools:layout_editor_absoluteY="12dp">
<android.support.constraint.Guideline
android:id="@+id/topIndicatorsGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.15" />
<android.support.constraint.Guideline
android:id="@+id/bottomIndicatorsGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.85" />
<android.support.constraint.Guideline
android:id="@+id/verticalGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<include
android:id="@+id/heartRateIndicator"
layout="@layout/Example_Vital_Signs_Heart_Rate_Indicator_Layout"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/topIndicatorsGuideline"
app:layout_constraintEnd_toStartOf="@id/verticalGuideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/bloodPressureIndicator"
layout="@layout/Example_Vital_Signs_Blood_Pressure_Indicator_Layout"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/topIndicatorsGuideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/verticalGuideline"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/bloodVolumeIndicator"
layout="@layout/Example_Vital_Signs_Blood_Volume_Indicator_Layout"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/verticalGuideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/bottomIndicatorsGuideline" />
<include
android:id="@+id/bloodOxygenationIndicator"
layout="@layout/Example_Vital_Signs_Blood_Oxygenation_Indicator_Layout"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/verticalGuideline"
app:layout_constraintTop_toBottomOf="@id/bottomIndicatorsGuideline" />
<com.scichart.charting.visuals.SciChartSurface
android:id="@+id/chart"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/bottomIndicatorsGuideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topIndicatorsGuideline" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/example_ecg_layout_background">
<ImageView
android:id="@+id/heartIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:contentDescription="@string/heart_icon_description"
android:src="@drawable/example_heart_icon_24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/bpmValueLabel"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:gravity="end|bottom"
android:singleLine="true"
android:textColor="@color/heart_rate_color"
android:textStyle="normal|bold|italic"
app:autoSizeTextType="uniform"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/heartIcon"
tools:text="69"
tools:textColor="@color/color_primary" />
<TextView
android:id="@+id/ecgLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:singleLine="true"
android:text="@string/ecg"
android:textAlignment="viewStart"
android:textColor="@color/heart_rate_color"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/heartRateInfoLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:text="@string/heartRateInfo"
android:gravity="bottom|start"
android:textColor="@color/heart_rate_color"
app:autoSizeTextType="uniform"
app:autoSizeMaxTextSize="10sp"
app:autoSizeMinTextSize="6sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/example_ecg_layout_background">
<TextView
android:id="@+id/svLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:text="@string/sv"
android:textColor="@color/blood_volume_color"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/svInfoLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:text="@string/svInfo"
android:textColor="@color/blood_volume_color"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/bloodVolumeValueLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="bottom|end"
android:textAlignment="gravity"
android:textColor="@color/blood_volume_color"
android:textSize="36sp"
android:textStyle="bold|italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toRightOf="@+id/svBar2"
app:layout_constraintRight_toRightOf="parent"
tools:text="13.0" />
<Xamarin.Examples.Demo.Droid.Components.StepProgressBar
android:id="@+id/svBar1"
android:layout_width="15dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="4dp"
app:barSize="3dp"
app:isVertical="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:max="10"
app:progressBackgroundColor="@android:color/transparent"
app:progressColor="@color/blood_volume_color"
app:spacing="2dp"
tools:progress="9" />
<Xamarin.Examples.Demo.Droid.Components.StepProgressBar
android:id="@+id/svBar2"
android:layout_width="15dp"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:layout_marginBottom="4dp"
app:barSize="3dp"
app:isVertical="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/svBar1"
app:max="10"
app:progressBackgroundColor="@android:color/transparent"
app:progressColor="@color/blood_volume_color"
app:spacing="2dp"
tools:progress="7" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/example_ecg_layout_background">
<TextView
android:id="@+id/nibpLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:text="@string/nibp"
android:textColor="@color/blood_pressure_color"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/nibpInfoLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:text="@string/nibpInfo"
android:textAlignment="textEnd"
android:textColor="@color/blood_pressure_color"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Xamarin.Examples.Demo.Droid.Components.StepProgressBar
android:id="@+id/bloodPressureBar"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
app:spacing="2dp"
app:barSize="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:max="5"
app:progressBackgroundColor="@color/blood_pressure_bar_background_color"
app:progressColor="@color/blood_pressure_bar_color"
tools:progress="5" />
<TextView
android:id="@+id/bloodPressureValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:gravity="bottom|end"
android:textColor="@color/blood_pressure_color"
android:textSize="36sp"
android:textStyle="bold|italic"
app:autoSizeTextType="uniform"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/bloodPressureBar"
tools:text="115/70" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/example_ecg_layout_background">
<TextView
android:id="@+id/spoLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="4dp"
android:gravity="start|top"
android:paddingBottom="5dp"
android:text="@string/spo2"
android:textAlignment="center"
android:textColor="@color/blood_oxygenation_color"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/spoClockLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginRight="8dp"
android:gravity="top|end"
android:textAlignment="viewStart"
android:textColor="@color/blood_oxygenation_color"
android:textSize="14sp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="16:40" />
<TextView
android:id="@+id/spoInfoLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginBottom="4dp"
android:text="@string/spoInfo"
android:textColor="@color/blood_oxygenation_color"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<TextView
android:id="@+id/spoValueLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:textAlignment="textEnd"
android:textColor="@color/blood_oxygenation_color"
android:textSize="36sp"
android:textStyle="normal|bold|italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:text="98" />
</android.support.constraint.ConstraintLayout>
using System;
using System.Drawing;
using SciChart.iOS.Charting;
namespace Xamarin.Examples.Demo.iOS
{
public class DimTracePaletteProvider: SCIPaletteProviderBase<SCIXyRenderableSeriesBase>, IISCIStrokePaletteProvider
{
private readonly int _startAlpha;
private readonly int _diffAlpha;
public DimTracePaletteProvider(int startAlpha = 51)
{
_startAlpha = startAlpha;
_diffAlpha = 255 - startAlpha;
StrokeColors = new SCIUnsignedIntegerValues();
}
public SCIUnsignedIntegerValues StrokeColors { get; }
public override void Update()
{
var defaultColor = RenderableSeries.StrokeStyle.Color;
var size = RenderableSeries.CurrentRenderPassData.PointsCount;
StrokeColors.Clear();
for (int i = 0; i < size; i++)
{
var alpha = 1 - (_startAlpha + _diffAlpha * i / size);
var color = defaultColor.Argb(alpha);
StrokeColors.Add(color);
}
}
}
}
using System;
using SciChart.iOS.Charting;
namespace Xamarin.Examples.Demo.iOS
{
public class RightAlignedOuterVerticallyStackedYAxisLayoutStrategy: SCIVerticalAxisLayoutStrategy
{
public RightAlignedOuterVerticallyStackedYAxisLayoutStrategy()
{
}
public override void MeasureAxesWithAvailableWidth(nfloat width, nfloat height, SCIChartLayoutState chartLayoutState)
{
foreach (IISCIAxis axis in Axes)
{
axis.UpdateAxisMeasurements();
chartLayoutState.RightOuterAreaSize = Math.Max((float)GetRequiredAxisSizeFrom(axis.AxisLayoutState), (float)chartLayoutState.RightOuterAreaSize);
}
}
public override void LayoutWithLeft(nfloat left, nfloat top, nfloat right, nfloat bottom)
{
var size = Axes.Count;
var height = bottom - top;
var axisHeight = height / size;
var topPlacement = top;
foreach (IISCIAxis axis in Axes)
{
float bottomPlacement = (float)Math.Round(topPlacement + axisHeight);
axis.LayoutArea(left, topPlacement, left + GetRequiredAxisSizeFrom(axis.AxisLayoutState), bottomPlacement);
topPlacement = bottomPlacement;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using SciChart.iOS.Charting;
using Xamarin.Examples.Demo.Showcase.VitalSignsMonitor;
namespace Xamarin.Examples.Demo.iOS
{
public class VitalSignsDataBatch
{
public VitalSignsDataBatch()
{
XValues = new SCIDoubleValues();
ECGHeartRateValuesA = new SCIDoubleValues();
BloodPressureValuesA = new SCIDoubleValues();
BloodVolumeValuesA = new SCIDoubleValues();
BloodOxygenationValuesA = new SCIDoubleValues();
ECGHeartRateValuesB = new SCIDoubleValues();
BloodPressureValuesB = new SCIDoubleValues();
BloodVolumeValuesB = new SCIDoubleValues();
BloodOxygenationValuesB = new SCIDoubleValues();
}
public SCIDoubleValues XValues { get; }
public SCIDoubleValues ECGHeartRateValuesA { get; }
public SCIDoubleValues BloodPressureValuesA { get; }
public SCIDoubleValues BloodVolumeValuesA { get; }
public SCIDoubleValues BloodOxygenationValuesA { get; }
public SCIDoubleValues ECGHeartRateValuesB { get; set; }
public SCIDoubleValues BloodPressureValuesB { get; set; }
public SCIDoubleValues BloodVolumeValuesB { get; set; }
public SCIDoubleValues BloodOxygenationValuesB { get; set; }
public VitalSignsData LastVitalSignsData { get; private set; }
public void UpdateData(IList<VitalSignsData> ecgDataList)
{
XValues.Clear();
ECGHeartRateValuesA.Clear();
BloodPressureValuesA.Clear();
BloodVolumeValuesA.Clear();
BloodOxygenationValuesA.Clear();
ECGHeartRateValuesB.Clear();
BloodPressureValuesB.Clear();
BloodVolumeValuesB.Clear();
BloodOxygenationValuesB.Clear();
foreach (var ecgData in ecgDataList)
{
XValues.Add(ecgData.XValue);
if (ecgData.IsATrace)
{
ECGHeartRateValuesA.Add(ecgData.ECGHeartRate);
BloodPressureValuesA.Add(ecgData.BloodPressure); ;
BloodVolumeValuesA.Add(ecgData.BloodVolume);
BloodOxygenationValuesA.Add(ecgData.BloodOxygenation);
ECGHeartRateValuesB.Add(Double.NaN);
BloodPressureValuesB.Add(Double.NaN);
BloodVolumeValuesB.Add(Double.NaN);
BloodOxygenationValuesB.Add(Double.NaN);
}
else
{
ECGHeartRateValuesB.Add(ecgData.ECGHeartRate);
BloodPressureValuesB.Add(ecgData.BloodPressure); ;
BloodVolumeValuesB.Add(ecgData.BloodVolume);
BloodOxygenationValuesB.Add(ecgData.BloodOxygenation);
ECGHeartRateValuesA.Add(Double.NaN);
BloodPressureValuesA.Add(Double.NaN);
BloodVolumeValuesA.Add(Double.NaN);
BloodOxygenationValuesA.Add(Double.NaN);
}
}
LastVitalSignsData = ecgDataList.Last();
}
}
}
using System;
using System.Threading;
using System.Collections.Generic;
using SciChart.iOS.Charting;
using CoreGraphics;
using UIKit;
using System.Reactive.Linq;
using System.Reactive.Disposables;
using Xamarin.Examples.Demo.Showcase.VitalSignsMonitor;
namespace Xamarin.Examples.Demo.iOS
{
[FeaturedExampleDefinition("Vital Signs Monitor", description: "Vital Signs Monitor", icon: ExampleIcon.FeatureChart)]
public partial class VitalSignsMonitorViewController : UIViewController
{
public VitalSignsMonitorViewController() : base("VitalSignsMonitorViewController", null)
{
}
private const int FifoCapacity = 7850;
private readonly XyDataSeries<double, double> _ecgDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _ecgSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodPressureDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodPressureSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodVolumeDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodVolumeSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodOxygenationDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _bloodOxygenationSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = FifoCapacity };
private readonly XyDataSeries<double, double> _lastEcgSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = 1 };
private readonly XyDataSeries<double, double> _lastBloodPressureDataSeries = new XyDataSeries<double, double>() { FifoCapacity = 1 };
private readonly XyDataSeries<double, double> _lastBloodVolumeDataSeries = new XyDataSeries<double, double>() { FifoCapacity = 1 };
private readonly XyDataSeries<double, double> _lastBloodOxygenationSweepDataSeries = new XyDataSeries<double, double>() { FifoCapacity = 1 };
private IDisposable _dataSubscription;
private readonly DefaultVitalSignsDataProvider _dataProvider = new DefaultVitalSignsDataProvider();
private readonly VitalSignsIndicatorsProvider _indicatorsProvider = new VitalSignsIndicatorsProvider();
private readonly VitalSignsDataBatch _dataBatch = new VitalSignsDataBatch();
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
SetupChart();
SetupIndicators();
var dataSubscription = _dataProvider.Data.Buffer(TimeSpan.FromMilliseconds(16)).ObserveOn(SynchronizationContext.Current).Do(data =>
{
if (data.Count == 0) return;
_dataBatch.UpdateData(data);
using (Surface.SuspendUpdates())
{
var xValues = _dataBatch.XValues;
_ecgDataSeries.AppendValues(xValues, _dataBatch.ECGHeartRateValuesA);
_ecgSweepDataSeries.AppendValues(xValues, _dataBatch.ECGHeartRateValuesB);
_bloodPressureDataSeries.AppendValues(xValues, _dataBatch.BloodPressureValuesA);
_bloodPressureSweepDataSeries.AppendValues(xValues, _dataBatch.BloodPressureValuesB);
_bloodOxygenationDataSeries.AppendValues(xValues, _dataBatch.BloodOxygenationValuesA);
_bloodOxygenationSweepDataSeries.AppendValues(xValues, _dataBatch.BloodOxygenationValuesB);
_bloodVolumeDataSeries.AppendValues(xValues, _dataBatch.BloodVolumeValuesA);
_bloodVolumeSweepDataSeries.AppendValues(xValues, _dataBatch.BloodVolumeValuesB);
var lastEcgData = _dataBatch.LastVitalSignsData;
var xValue = lastEcgData.XValue;
_lastEcgSweepDataSeries.Append(xValue, lastEcgData.ECGHeartRate);
_lastBloodPressureDataSeries.Append(xValue, lastEcgData.BloodPressure);
_lastBloodOxygenationSweepDataSeries.Append(xValue, lastEcgData.BloodOxygenation);
_lastBloodVolumeDataSeries.Append(xValue, lastEcgData.BloodVolume);
}
}).Subscribe();
UpdateIndicators(0);
var indicatorSubscription = Observable.Interval(TimeSpan.FromSeconds(1)).ObserveOn(SynchronizationContext.Current).Do(UpdateIndicators).Subscribe();
_dataSubscription = new CompositeDisposable(dataSubscription, indicatorSubscription);
}
public override void ViewDidDisappear(bool animated)
{
base.ViewDidDisappear(animated);
_dataSubscription.Dispose();
}
void SetupChart()
{
var xAxis = new SCINumericAxis()
{
VisibleRange = new SCIDoubleRange(0, 10),
AutoRange = SCIAutoRange.Never,
DrawMinorGridLines = false,
DrawMajorBands = false,
IsVisible = false
};
const string ecgId = "ecgId";
const string bloodPressureId = "bloodPressureId";
const string bloodVolumeId = "bloodVolumeId";
const string bloodOxygenationId = "bloodOxygenationId";
const uint heartRateColor = 0xFF42B649;
const uint bloodPressureColor = 0xFFFFFF00;
const uint bloodVolumeColor = 0xFFB0C4DE;
const uint bloodOxygenation = 0xFF6495ED;
using (Surface.SuspendUpdates())
{
Surface.XAxes.Add(xAxis);
Surface.YAxes.Add(GenerateYAxis(ecgId, _dataProvider.EcgHeartRateRange));
Surface.YAxes.Add(GenerateYAxis(bloodPressureId, _dataProvider.BloodPressureRange));
Surface.YAxes.Add(GenerateYAxis(bloodVolumeId, _dataProvider.BloodVolumeRange));
Surface.YAxes.Add(GenerateYAxis(bloodOxygenationId, _dataProvider.BloodOxygenationRange));
var ecgSeries = GenerateSeries(ecgId, Tuple.Create(_ecgDataSeries, _ecgSweepDataSeries, _lastEcgSweepDataSeries), heartRateColor);
var bloodPressureSeries = GenerateSeries(bloodPressureId, Tuple.Create(_bloodPressureDataSeries, _bloodPressureSweepDataSeries, _lastBloodPressureDataSeries), bloodPressureColor);
var bloodVolumeSeries = GenerateSeries(bloodVolumeId, Tuple.Create(_bloodVolumeDataSeries, _bloodVolumeSweepDataSeries, _lastBloodVolumeDataSeries), bloodVolumeColor);
var bloodOxygenationSeries = GenerateSeries(bloodOxygenationId, Tuple.Create(_bloodOxygenationDataSeries, _bloodOxygenationSweepDataSeries, _lastBloodOxygenationSweepDataSeries), bloodOxygenation);
foreach (var rs in ecgSeries)
{
Surface.RenderableSeries.Add(rs);
}
foreach (var rs in bloodPressureSeries)
{
Surface.RenderableSeries.Add(rs);
}
foreach (var rs in bloodVolumeSeries)
{
Surface.RenderableSeries.Add(rs);
}
foreach (var rs in bloodOxygenationSeries)
{
Surface.RenderableSeries.Add(rs);
}
Surface.LayoutManager = new SCIDefaultLayoutManager()
{
RightOuterAxisLayoutStrategy = new RightAlignedOuterVerticallyStackedYAxisLayoutStrategy()
};
}
}
private SCINumericAxis GenerateYAxis(string axisId, (double, double) visibleRange)
{
return new SCINumericAxis()
{
AxisId = axisId,
IsVisible = false,
VisibleRange = new SCIDoubleRange(visibleRange.Item1, visibleRange.Item2),
AutoRange = SCIAutoRange.Never,
DrawMajorBands = false,
DrawMinorGridLines = false,
DrawMajorGridLines = false,
};
}
private IEnumerable<IISCIRenderableSeries> GenerateSeries(
string yAxisId, Tuple<XyDataSeries<double, double>, XyDataSeries<double, double>, XyDataSeries<double, double>> dataSeries, uint color)
{
var thickness = 1f;
var penStyle = new SCISolidPenStyle(color, thickness);
var pointMarkerSize = (int)(4 * thickness);
var rs1 = new SCIFastLineRenderableSeries()
{
YAxisId = yAxisId,
DataSeries = dataSeries.Item1,
StrokeStyle = penStyle,
PaletteProvider = new DimTracePaletteProvider()
};
var rs2 = new SCIFastLineRenderableSeries()
{
YAxisId = yAxisId,
DataSeries = dataSeries.Item2,
StrokeStyle = penStyle,
PaletteProvider = new DimTracePaletteProvider()
};
var rs3 = new SCIXyScatterRenderableSeries()
{
YAxisId = yAxisId,
DataSeries = dataSeries.Item3,
PointMarker = new SCIEllipsePointMarker()
{
Size = new CGSize(pointMarkerSize, pointMarkerSize),
FillStyle = new SCISolidBrushStyle(color),
StrokeStyle = new SCISolidPenStyle(UIColor.White, thickness)
}
};
return new IISCIRenderableSeries[] { rs1, rs2, rs3 };
}
private void SetupIndicators()
{
ProgressBarStyle bpBarStyle = new ProgressBarStyle(false, 10, 2, 3, UIColor.FromRGB(100, 100, 100), UIColor.FromRGB(66, 182, 73));
BloodPressureBar.SetStyle(bpBarStyle);
ProgressBarStyle svBarStyle = new ProgressBarStyle(true, 12, 2, 3, UIColor.Clear, UIColor.FromRGB(176, 196, 222));
SvBar1.SetStyle(svBarStyle);
SvBar2.SetStyle(svBarStyle);
BloodPressureBar.SetProgress(2);
SvBar1.SetProgress(3);
SvBar2.SetProgress(4);
}
private void UpdateIndicators(long time)
{
HeartImageView.Hidden = time % 2 == 0 ? false : true;
if (time % 5 == 0)
{
_indicatorsProvider.Update();
BpmValueLabel.Text = _indicatorsProvider.BpmValue;
BloodPressureValueLabel.Text = _indicatorsProvider.BpValue;
BloodPressureBar.SetProgress(_indicatorsProvider.BpbValue);
BloodVolumeValueLabel.Text = _indicatorsProvider.BvValue;
SvBar1.SetProgress(_indicatorsProvider.BvBar1Value);
SvBar2.SetProgress(_indicatorsProvider.BvBar2Value);
SpoValueLabel.Text = _indicatorsProvider.SpoValue;
SpoClockLabel.Text = _indicatorsProvider.SpoClockValue;
}
}
}
}
// WARNING
//
// This file has been generated automatically by Visual Studio from the outlets and
// actions declared in your storyboard file.
// Manual changes to this file will not be maintained.
//
using Foundation;
using System;
using System.CodeDom.Compiler;
namespace Xamarin.Examples.Demo.iOS
{
[Register ("VitalSignsMonitorViewController")]
partial class VitalSignsMonitorViewController
{
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
Xamarin.Examples.Demo.iOS.StepProgressBar BloodPressureBar { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UILabel BloodPressureValueLabel { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UILabel BloodVolumeValueLabel { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UILabel BpmValueLabel { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UIImageView HeartImageView { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UILabel SpoClockLabel { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UILabel SpoValueLabel { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
SciChart.iOS.Charting.SCIChartSurface Surface { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
Xamarin.Examples.Demo.iOS.StepProgressBar SvBar1 { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
Xamarin.Examples.Demo.iOS.StepProgressBar SvBar2 { get; set; }
void ReleaseDesignerOutlets ()
{
if (BloodPressureBar != null) {
BloodPressureBar.Dispose ();
BloodPressureBar = null;
}
if (BloodPressureValueLabel != null) {
BloodPressureValueLabel.Dispose ();
BloodPressureValueLabel = null;
}
if (BloodVolumeValueLabel != null) {
BloodVolumeValueLabel.Dispose ();
BloodVolumeValueLabel = null;
}
if (BpmValueLabel != null) {
BpmValueLabel.Dispose ();
BpmValueLabel = null;
}
if (HeartImageView != null) {
HeartImageView.Dispose ();
HeartImageView = null;
}
if (SpoClockLabel != null) {
SpoClockLabel.Dispose ();
SpoClockLabel = null;
}
if (SpoValueLabel != null) {
SpoValueLabel.Dispose ();
SpoValueLabel = null;
}
if (Surface != null) {
Surface.Dispose ();
Surface = null;
}
if (SvBar1 != null) {
SvBar1.Dispose ();
SvBar1 = null;
}
if (SvBar2 != null) {
SvBar2.Dispose ();
SvBar2 = null;
}
}
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VitalSignsMonitorViewController">
<connections>
<outlet property="BloodPressureValueLabel" destination="50V-Ll-ORe" id="name-outlet-50V-Ll-ORe"/>
<outlet property="BpmValueLabel" destination="74C-G4-T8d" id="name-outlet-74C-G4-T8d"/>
<outlet property="BloodVolumeValueLabel" destination="NQ7-wO-MY4" id="name-outlet-NQ7-wO-MY4"/>
<outlet property="HeartImageView" destination="4FS-AV-kPP" id="name-outlet-4FS-AV-kPP"/>
<outlet property="SpoClockLabel" destination="2Mh-wl-DEX" id="name-outlet-2Mh-wl-DEX"/>
<outlet property="SpoValueLabel" destination="ERy-I2-UnE" id="name-outlet-ERy-I2-UnE"/>
<outlet property="Surface" destination="fW6-gT-aIU" id="name-outlet-fW6-gT-aIU"/>
<outlet property="SvBar1" destination="fgb-vg-AMH" id="name-outlet-fgb-vg-AMH"/>
<outlet property="SvBar2" destination="UMf-FW-iFB" id="name-outlet-UMf-FW-iFB"/>
<outlet property="view" destination="YXC-2Q-kAx" id="yeC-Wk-TKr"/>
<outlet property="BloodPressureBar" destination="LuK-FP-khb" id="name-outlet-LuK-FP-khb"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="YXC-2Q-kAx">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Yv-7M-MJv" userLabel="TopView" misplaced="YES" ambiguous="YES">
<rect key="frame" x="0.0" y="44" width="414" height="131"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="QQe-xC-7Dv" misplaced="YES" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="414" height="131"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QOO-EC-T6y" userLabel="ECG View" customClass="BorderedView" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="207" height="131"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ECG" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y1e-dD-vvP">
<rect key="frame" x="8" y="8" width="36" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.25882352939999997" green="0.71372549019999998" blue="0.28627450980000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EE2-SV-H7c">
<rect key="frame" x="8" y="99" width="79" height="24"/>
<string key="text">V1- 1.4MM
ST |+ 0.6 ||+ 0.9</string>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.25882352939999997" green="0.71372549019999998" blue="0.28627450980000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon.heart" translatesAutoresizingMaskIntoConstraints="NO" id="4FS-AV-kPP" misplaced="YES" ambiguous="YES">
<rect key="frame" x="175" y="8" width="24" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="SAg-eV-wbI"/>
<constraint firstAttribute="height" constant="24" id="rJt-94-gmO"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="87" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="74C-G4-T8d" misplaced="YES" ambiguous="YES">
<rect key="frame" x="157.5" y="88" width="41.5" height="43"/>
<fontDescription key="fontDescription" type="italicSystem" pointSize="36"/>
<color key="textColor" red="0.25882352939999997" green="0.71372549019999998" blue="0.28627450980000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="y1e-dD-vvP" firstAttribute="leading" secondItem="QOO-EC-T6y" secondAttribute="leading" constant="8" id="2vY-cY-lpN"/>
<constraint firstAttribute="bottom" secondItem="EE2-SV-H7c" secondAttribute="bottom" constant="8" id="ETc-hb-WZJ"/>
<constraint firstItem="EE2-SV-H7c" firstAttribute="leading" secondItem="QOO-EC-T6y" secondAttribute="leading" constant="8" id="KED-gw-VhD"/>
<constraint firstItem="y1e-dD-vvP" firstAttribute="top" secondItem="QOO-EC-T6y" secondAttribute="top" constant="8" id="SFA-Up-7Lv"/>
<constraint firstAttribute="bottom" secondItem="74C-G4-T8d" secondAttribute="bottom" id="f6r-yh-avf"/>
<constraint firstItem="4FS-AV-kPP" firstAttribute="top" secondItem="QOO-EC-T6y" secondAttribute="top" constant="8" id="iNJ-Vj-hLZ"/>
<constraint firstAttribute="trailing" secondItem="74C-G4-T8d" secondAttribute="trailing" constant="8" id="mRr-Tr-DTY"/>
<constraint firstAttribute="trailing" secondItem="4FS-AV-kPP" secondAttribute="trailing" constant="8" id="y45-Jf-iK3"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qBJ-iT-iRW" userLabel="NIBP View" customClass="BorderedView" ambiguous="YES">
<rect key="frame" x="207" y="0.0" width="207" height="131"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NIBP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lik-XX-ys4">
<rect key="frame" x="8" y="8" width="40" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9iD-BC-3XY" misplaced="YES" ambiguous="YES">
<rect key="frame" x="141.5" y="8" width="57.5" height="43"/>
<string key="text">AUTO
145/95</string>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LuK-FP-khb" customClass="StepProgressBar">
<rect key="frame" x="8" y="103" width="50" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="HtF-R6-Mhg"/>
<constraint firstAttribute="width" constant="50" id="mpS-3G-ZOF"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="87" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="50V-Ll-ORe" misplaced="YES" ambiguous="YES">
<rect key="frame" x="157.5" y="88" width="41.5" height="43"/>
<fontDescription key="fontDescription" type="italicSystem" pointSize="36"/>
<color key="textColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="lik-XX-ys4" firstAttribute="leading" secondItem="qBJ-iT-iRW" secondAttribute="leading" constant="8" id="0ZF-5X-Oz1"/>
<constraint firstAttribute="bottom" secondItem="LuK-FP-khb" secondAttribute="bottom" constant="8" id="MIY-WT-Ag2"/>
<constraint firstItem="9iD-BC-3XY" firstAttribute="top" secondItem="qBJ-iT-iRW" secondAttribute="top" constant="8" id="PEY-xl-iK1"/>
<constraint firstAttribute="bottom" secondItem="50V-Ll-ORe" secondAttribute="bottom" id="UPk-1k-fsS"/>
<constraint firstAttribute="trailing" secondItem="9iD-BC-3XY" secondAttribute="trailing" constant="8" id="WD8-td-VsB"/>
<constraint firstItem="LuK-FP-khb" firstAttribute="leading" secondItem="qBJ-iT-iRW" secondAttribute="leading" constant="8" id="mFJ-z0-DJS"/>
<constraint firstItem="lik-XX-ys4" firstAttribute="top" secondItem="qBJ-iT-iRW" secondAttribute="top" constant="8" id="wOA-UO-LNs"/>
<constraint firstAttribute="trailing" secondItem="50V-Ll-ORe" secondAttribute="trailing" constant="8" id="wk7-LB-sdG"/>
</constraints>
</view>
</subviews>
<variation key="heightClass=compact" axis="vertical"/>
</stackView>
</subviews>
<constraints>
<constraint firstItem="QQe-xC-7Dv" firstAttribute="leading" secondItem="1Yv-7M-MJv" secondAttribute="leading" id="CTb-Oz-hCg"/>
<constraint firstAttribute="bottom" secondItem="QQe-xC-7Dv" secondAttribute="bottom" id="fG5-Ct-mLN"/>
<constraint firstAttribute="height" constant="131" id="iaP-dr-oyK"/>
<constraint firstAttribute="trailing" secondItem="QQe-xC-7Dv" secondAttribute="trailing" id="ieG-6b-IF9"/>
<constraint firstItem="QQe-xC-7Dv" firstAttribute="top" secondItem="1Yv-7M-MJv" secondAttribute="top" id="jsV-AN-b7U"/>
<constraint firstAttribute="width" constant="200" id="xy9-bQ-3rV"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="xy9-bQ-3rV"/>
</mask>
</variation>
<variation key="heightClass=compact">
<mask key="constraints">
<exclude reference="iaP-dr-oyK"/>
<include reference="xy9-bQ-3rV"/>
</mask>
</variation>
</view>
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fW6-gT-aIU" userLabel="Chart Surface" customClass="SCIChartSurface" ambiguous="YES">
<rect key="frame" x="0.0" y="175" width="414" height="556"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QX3-9Q-c6t" userLabel="BottomView" misplaced="YES" ambiguous="YES">
<rect key="frame" x="0.0" y="731" width="414" height="131"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="UVq-uF-GH8" misplaced="YES" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="414" height="131"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OzH-6f-Z2V" userLabel="NIBP View" customClass="BorderedView" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="207" height="131"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SV" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NIW-0J-9e8">
<rect key="frame" x="8" y="8" width="23" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.69019607839999997" green="0.76862745099999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NwW-mb-qnB" misplaced="YES" ambiguous="YES">
<rect key="frame" x="114" y="8" width="85" height="43"/>
<string key="text">ML 100
%***** 55</string>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.69019607839999997" green="0.76862745099999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="raq-B6-i3S">
<rect key="frame" x="8" y="78" width="43" height="45"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fgb-vg-AMH" customClass="StepProgressBar">
<rect key="frame" x="0.0" y="0.0" width="20" height="45"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="tLB-tW-1g5"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UMf-FW-iFB" customClass="StepProgressBar">
<rect key="frame" x="23" y="0.0" width="20" height="45"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="uEl-le-DDM"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="45" id="5N6-kn-j6z"/>
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="87" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NQ7-wO-MY4" misplaced="YES" ambiguous="YES">
<rect key="frame" x="157.5" y="88" width="41.5" height="43"/>
<fontDescription key="fontDescription" type="italicSystem" pointSize="36"/>
<color key="textColor" red="0.69019607839999997" green="0.76862745099999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="raq-B6-i3S" firstAttribute="leading" secondItem="OzH-6f-Z2V" secondAttribute="leading" constant="8" id="35G-l3-6tx"/>
<constraint firstItem="NIW-0J-9e8" firstAttribute="leading" secondItem="OzH-6f-Z2V" secondAttribute="leading" constant="8" id="7Nd-O0-jza"/>
<constraint firstAttribute="bottom" secondItem="raq-B6-i3S" secondAttribute="bottom" constant="8" id="Uht-YM-Wmo"/>
<constraint firstAttribute="trailing" secondItem="NQ7-wO-MY4" secondAttribute="trailing" constant="8" id="mbO-yu-7a0"/>
<constraint firstAttribute="bottom" secondItem="NQ7-wO-MY4" secondAttribute="bottom" id="qhu-2a-tLQ"/>
<constraint firstItem="NIW-0J-9e8" firstAttribute="top" secondItem="OzH-6f-Z2V" secondAttribute="top" constant="8" id="sBx-Mp-by4"/>
<constraint firstItem="NwW-mb-qnB" firstAttribute="top" secondItem="OzH-6f-Z2V" secondAttribute="top" constant="8" id="uXO-uj-juQ"/>
<constraint firstAttribute="trailing" secondItem="NwW-mb-qnB" secondAttribute="trailing" constant="8" id="zDB-hI-seT"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a09-6i-5Sy" userLabel="SPO2 View" customClass="BorderedView" ambiguous="YES">
<rect key="frame" x="207" y="0.0" width="207" height="131"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SPO2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nc1-pt-zYg">
<rect key="frame" x="8" y="8" width="46" height="21.5"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.3921568627" green="0.58431372550000005" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="14:35" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Mh-wl-DEX" misplaced="YES" ambiguous="YES">
<rect key="frame" x="162.5" y="8" width="36.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.3921568627" green="0.58431372550000005" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="87" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ERy-I2-UnE" misplaced="YES" ambiguous="YES">
<rect key="frame" x="157.5" y="88" width="41.5" height="43"/>
<fontDescription key="fontDescription" type="italicSystem" pointSize="36"/>
<color key="textColor" red="0.3921568627" green="0.58431372550000005" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2c4-uX-nPM">
<rect key="frame" x="8" y="99" width="26" height="24"/>
<string key="text">71-
RESP</string>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.3921568627" green="0.58431372550000005" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="2Mh-wl-DEX" secondAttribute="trailing" constant="8" id="815-QX-Z6q"/>
<constraint firstItem="2c4-uX-nPM" firstAttribute="leading" secondItem="a09-6i-5Sy" secondAttribute="leading" constant="8" id="EEC-WQ-ZRo"/>
<constraint firstAttribute="trailing" secondItem="ERy-I2-UnE" secondAttribute="trailing" constant="8" id="Jvq-vT-Fn8"/>
<constraint firstItem="nc1-pt-zYg" firstAttribute="top" secondItem="a09-6i-5Sy" secondAttribute="top" constant="8" id="LYU-uQ-7g5"/>
<constraint firstAttribute="bottom" secondItem="2c4-uX-nPM" secondAttribute="bottom" constant="8" id="My3-hc-EvF"/>
<constraint firstItem="nc1-pt-zYg" firstAttribute="leading" secondItem="a09-6i-5Sy" secondAttribute="leading" constant="8" id="SD0-I2-srB"/>
<constraint firstAttribute="bottom" secondItem="ERy-I2-UnE" secondAttribute="bottom" id="fHZ-x0-dH0"/>
<constraint firstItem="2Mh-wl-DEX" firstAttribute="top" secondItem="a09-6i-5Sy" secondAttribute="top" constant="8" id="fTI-RC-KqL"/>
</constraints>
</view>
</subviews>
<variation key="heightClass=compact" axis="vertical"/>
</stackView>
</subviews>
<constraints>
<constraint firstItem="UVq-uF-GH8" firstAttribute="leading" secondItem="QX3-9Q-c6t" secondAttribute="leading" id="4sg-bR-4K1"/>
<constraint firstItem="UVq-uF-GH8" firstAttribute="top" secondItem="QX3-9Q-c6t" secondAttribute="top" id="Dlg-Bb-1Ch"/>
<constraint firstAttribute="trailing" secondItem="UVq-uF-GH8" secondAttribute="trailing" id="KwS-Io-IsF"/>
<constraint firstAttribute="bottom" secondItem="UVq-uF-GH8" secondAttribute="bottom" id="TTf-fl-eMw"/>
<constraint firstAttribute="height" constant="131" id="oSH-hV-Kzt"/>
</constraints>
<variation key="heightClass=compact">
<mask key="constraints">
<exclude reference="oSH-hV-Kzt"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ySI-pX-aws" firstAttribute="trailing" secondItem="fW6-gT-aIU" secondAttribute="trailing" id="0NN-j6-8Sn"/>
<constraint firstItem="fW6-gT-aIU" firstAttribute="leading" secondItem="ySI-pX-aws" secondAttribute="leading" id="0Yg-JK-X9J"/>
<constraint firstItem="QX3-9Q-c6t" firstAttribute="leading" secondItem="1Yv-7M-MJv" secondAttribute="leading" id="7LK-FB-BWu"/>
<constraint firstItem="fW6-gT-aIU" firstAttribute="top" secondItem="1Yv-7M-MJv" secondAttribute="bottom" id="9sO-Eh-drS"/>
<constraint firstItem="1Yv-7M-MJv" firstAttribute="trailing" secondItem="ySI-pX-aws" secondAttribute="trailing" id="Dy3-C9-r1O"/>
<constraint firstItem="ySI-pX-aws" firstAttribute="bottom" secondItem="QX3-9Q-c6t" secondAttribute="bottom" id="MeN-e2-fLn"/>
<constraint firstItem="1Yv-7M-MJv" firstAttribute="leading" secondItem="fW6-gT-aIU" secondAttribute="trailing" id="Nen-k5-2Jn"/>
<constraint firstItem="1Yv-7M-MJv" firstAttribute="leading" secondItem="ySI-pX-aws" secondAttribute="leading" id="TcY-TD-SQP"/>
<constraint firstItem="QX3-9Q-c6t" firstAttribute="top" secondItem="fW6-gT-aIU" secondAttribute="bottom" id="a0O-tk-4sS"/>
<constraint firstItem="1Yv-7M-MJv" firstAttribute="height" secondItem="fW6-gT-aIU" secondAttribute="height" multiplier="0.5" id="cyY-7l-fsP"/>
<constraint firstItem="QX3-9Q-c6t" firstAttribute="leading" secondItem="ySI-pX-aws" secondAttribute="leading" id="gxv-yf-1Aw"/>
<constraint firstItem="ySI-pX-aws" firstAttribute="bottom" secondItem="fW6-gT-aIU" secondAttribute="bottom" id="mrx-BR-bDW"/>
<constraint firstItem="ySI-pX-aws" firstAttribute="trailing" secondItem="QX3-9Q-c6t" secondAttribute="trailing" id="nyh-99-RtM"/>
<constraint firstItem="1Yv-7M-MJv" firstAttribute="top" secondItem="ySI-pX-aws" secondAttribute="top" id="tiF-KF-Lrc"/>
<constraint firstItem="QX3-9Q-c6t" firstAttribute="height" secondItem="1Yv-7M-MJv" secondAttribute="height" id="vZd-Qs-geB"/>
<constraint firstItem="fW6-gT-aIU" firstAttribute="top" secondItem="ySI-pX-aws" secondAttribute="top" id="wQZ-d0-uaW"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ySI-pX-aws"/>
<variation key="default">
<mask key="constraints">
<exclude reference="mrx-BR-bDW"/>
<exclude reference="Nen-k5-2Jn"/>
<exclude reference="cyY-7l-fsP"/>
<exclude reference="wQZ-d0-uaW"/>
<exclude reference="7LK-FB-BWu"/>
<exclude reference="vZd-Qs-geB"/>
</mask>
</variation>
<variation key="heightClass=compact">
<mask key="constraints">
<exclude reference="0NN-j6-8Sn"/>
<include reference="mrx-BR-bDW"/>
<include reference="Nen-k5-2Jn"/>
<exclude reference="TcY-TD-SQP"/>
<include reference="cyY-7l-fsP"/>
<exclude reference="9sO-Eh-drS"/>
<include reference="wQZ-d0-uaW"/>
<include reference="7LK-FB-BWu"/>
<exclude reference="a0O-tk-4sS"/>
<exclude reference="gxv-yf-1Aw"/>
<include reference="vZd-Qs-geB"/>
</mask>
</variation>
<point key="canvasLocation" x="131.8840579710145" y="118.52678571428571"/>
</view>
</objects>
<resources>
<image name="icon.heart" width="24" height="24"/>
</resources>
</document>