コード例 #1
0
        public TPlot()
        {
            ShowAll();
            range = 40;

            HeightRequest = 250;
            WidthRequest  = 300;

            dati = new Punto[range];
            for (int i = 0; i <= dati.Length - 1; i++)
            {
                dati[i] = new Punto(i * (120 / range), 0);
            }

            model = new PlotModel
            {
                Title           = "Temperatura(°C)",
                TitleFontSize   = 10,
                IsLegendVisible = false
            };
            Model = model;

            line = new LineSeries
            {
                Title       = "Temperatura",
                Background  = OxyColors.Black,
                Color       = OxyColors.Red,
                LineStyle   = LineStyle.Solid,
                ItemsSource = dati
            };
            model.Series.Add(line);

            LineAnnotation topGuide = new LineAnnotation
            {
                Text = "Ipertermia",
                TextVerticalAlignment = VerticalAlignment.Bottom,
                TextColor             = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 39
            };

            model.Annotations.Add(topGuide);

            LineAnnotation bottomGuide = new LineAnnotation
            {
                Text = "Ipotermia",
                TextVerticalAlignment = VerticalAlignment.Top,
                TextColor             = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 35
            };

            model.Annotations.Add(bottomGuide);

            Xaxis = new LinearAxis
            {
                Title         = "min",
                Position      = AxisPosition.Bottom,
                Maximum       = 120,
                IsPanEnabled  = false,
                IsZoomEnabled = false
            };
            model.Axes.Add(Xaxis);

            Yaxis = new LinearAxis
            {
                Title           = "°C",
                TitleColor      = OxyColors.White,
                Position        = AxisPosition.Left,
                Maximum         = 50,
                AbsoluteMinimum = 0,
                Angle           = 90
            };
            model.Axes.Add(Yaxis);

            Refresh = true;
        }
コード例 #2
0
        public DBPPlot()
        {
            ShowAll();
            range = 60;

            HeightRequest = 150;
            WidthRequest  = 300;

            dati = new Punto[range];
            for (int i = 0; i <= dati.Length - 1; i++)
            {
                dati[i] = new Punto(i * (120 / range), 0);
            }

            model = new PlotModel
            {
                Title           = "Pressione Diastolica",
                TitleFontSize   = 10,
                Padding         = new OxyThickness(-10, 5, 5, -10),
                IsLegendVisible = false
            };

            line = new LineSeries
            {
                Title       = "DBP",
                Background  = OxyColors.White,
                Color       = OxyColors.Orange,
                LineStyle   = LineStyle.Solid,
                ItemsSource = dati,
            };
            model.Series.Add(line);

            LineAnnotation topGuide = new LineAnnotation
            {
                Text = "Ipertensione",
                TextVerticalAlignment = VerticalAlignment.Bottom,
                TextColor             = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 90
            };

            model.Annotations.Add(topGuide);

            LineAnnotation bottomGuide = new LineAnnotation
            {
                Text = "Ipotensione",
                TextVerticalAlignment = VerticalAlignment.Top,
                TextColor             = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 70
            };

            model.Annotations.Add(bottomGuide);

            Xaxis = new LinearAxis
            {
                Title         = "min",
                Position      = AxisPosition.Bottom,
                Maximum       = 120,
                IsPanEnabled  = false,
                IsZoomEnabled = false,

                /*
                 * MajorGridlineStyle = LineStyle.Solid,
                 * MajorGridlineColor = OxyColors.Gray,
                 * MinorGridlineStyle = LineStyle.Dot,
                 * MinorGridlineColor = OxyColors.Gray,
                 */
            };
            model.Axes.Add(Xaxis);

            Yaxis = new LinearAxis
            {
                Title           = "mmHg",
                TitleColor      = OxyColors.White,
                Position        = AxisPosition.Left,
                Maximum         = 200,
                AbsoluteMinimum = 0,

                /*
                 * MajorGridlineStyle = LineStyle.Solid,
                 * MajorGridlineColor = OxyColors.Gray,
                 * MinorGridlineStyle = LineStyle.Dot,
                 * MinorGridlineColor = OxyColors.Gray,
                 */
                Angle = 90
            };
            model.Axes.Add(Yaxis);

            Model = model;
        }
コード例 #3
0
        public BPPlot()
        {
            ShowAll();
            range = 60;

            HeightRequest = 250;
            WidthRequest  = 300;

            dati  = new Punto[range];
            dati2 = new Punto[range];
            for (int i = 0; i <= dati.Length - 1; i++)
            {
                dati[i]  = new Punto(i * (120 / range), 0);
                dati2[i] = new Punto(i * (120 / range), 0);
            }

            model = new PlotModel
            {
                Title           = "Pressione Sistolica/Diastolica(mmHg)",
                TitleFontSize   = 10,
                LegendTextColor = OxyColors.White
            };
            Model = model;

            line = new LineSeries
            {
                Title       = "SBP",
                Background  = OxyColors.Black,
                Color       = OxyColors.Red,
                LineStyle   = LineStyle.Solid,
                ItemsSource = dati,
            };
            model.Series.Add(line);

            line2 = new LineSeries
            {
                Title       = "DBP",
                Color       = OxyColors.Blue,
                LineStyle   = LineStyle.Solid,
                ItemsSource = dati2,
            };
            model.Series.Add(line2);

            LineAnnotation topGuideSBP = new LineAnnotation
            {
                Text = "Ipertensione",
                TextVerticalAlignment = VerticalAlignment.Bottom,
                TextColor             = OxyColors.Red,
                Color     = OxyColors.Red,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 140
            };

            model.Annotations.Add(topGuideSBP);

            LineAnnotation bottomGuideSBP = new LineAnnotation
            {
                Text = "Ipotensione",
                TextVerticalAlignment = VerticalAlignment.Bottom,
                TextColor             = OxyColors.Red,
                Color     = OxyColors.Red,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 100
            };

            model.Annotations.Add(bottomGuideSBP);

            LineAnnotation topGuideDBP = new LineAnnotation
            {
                Text = "Ipertensione",
                TextVerticalAlignment = VerticalAlignment.Top,
                TextColor             = OxyColors.Blue,
                Color     = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 90
            };

            model.Annotations.Add(topGuideDBP);

            LineAnnotation bottomGuideDBP = new LineAnnotation
            {
                Text = "Ipotensione",
                TextVerticalAlignment = VerticalAlignment.Top,
                TextColor             = OxyColors.Blue,
                Color     = OxyColors.Blue,
                Type      = LineAnnotationType.Horizontal,
                LineStyle = LineStyle.Solid,
                Y         = 70
            };

            model.Annotations.Add(bottomGuideDBP);

            Xaxis = new LinearAxis
            {
                Title         = "min",
                Position      = AxisPosition.Bottom,
                Maximum       = 120,
                IsPanEnabled  = false,
                IsZoomEnabled = false,
            };
            model.Axes.Add(Xaxis);

            Yaxis = new LinearAxis
            {
                Title           = "mmHg",
                TitleColor      = OxyColors.White,
                Position        = AxisPosition.Left,
                Maximum         = 200,
                AbsoluteMinimum = 0,
                Angle           = 90
            };
            model.Axes.Add(Yaxis);

            Refresh = true;
        }