WPF - OXYデッサン_old

plotModel = 新しいPlotModel()
            { 
                タイトル = " 数据统计" 
                LegendTitle = " 最大:红色、最小:黄色" 
                LegendOrientation = LegendOrientation.Horizo​​ntal、
                LegendPlacement = LegendPlacement.Inside、
                LegendPosition = LegendPosition.TopRight、
                LegendBackground = OxyColor.FromAColor(200 、OxyColors.Beige)、
                LegendBorder = OxyColors.Black、 
                DefaultFont = " 微软雅黑" 
            }。

            #regionの X、Y轴// X轴VAR _dateAxis = 新しいDateTimeAxisオブジェクト()
            { 
                MajorGridlineStyle = LineStyle.Solid、
                MinorGridlineStyle = LineStyle.Dot、
                IntervalLength = 80 
                IsZoomEnabled = 
                IsPanEnabled = 
                StringFormat = "


            
             M / DのHH: MM:SS " 
                タイトル = " 時間" 
            }; 
            plotModel.Axes.Add(_dateAxis); 

            // Y軸
            のvar _valueAxis = 新しい新たLinearAxis()
            { 
                タイトル = " " 
                最大 = USL USL + / 。4 
                最小値 = LSL - LSL / 3 
                MajorGridlineStyle = LineStyle.Solid、// メインスケールに配置されたグリッド 
                MinorGridlineStyle = LineStyle.Dot、//サブスケール格子パターンが設けられています。 
                IntervalLength = 80 
                角度 = 60 
                IsZoomEnabled = trueに// スケーリング座標軸 
                IsPanEnabled =をtrueに// チャートは、ズーム 
                位置= AxisPosition.Left、
            ;} 
            plotModel.Axes.Add(_valueAxis); 

            #endregionの

            #regionの行を// 動的ラインのvar lineSerial = 新しい新しいLineSeriesが()
            { 
                タイトル = SvidSelected.ParaName、//

            
            eqpParam名 
                カラー= OxyColors.Black、
                滑らか = 
                MarkerType = MarkerType.Circle、
                StrokeThickness = 0 
                MarkerSize = 1 
                MarkerStroke = OxyColors.BlueViolet、
            }。
            plotModel.Series.Add(lineSerial)。

            Task.Factory.StartNew(() =>は
               { 
                   ためint型 i = 0 ; I <resData.Count; iは++ 
                   { 
                       LineSerial.Points.Add(DateTimeAxis.CreateDataPoint(ResData [I] .occurenceTime、ResData [I] .val)); 
                       plotModel.InvalidatePlot(真の); //は毎秒ビューリフレッシュ 
                        // のThread.sleepを(200で)。
                   } 
                   sw.Stop(); 
                   TotalDate = " 総レンダリング時間(ミリ秒):" + sw.ElapsedMilliseconds; // sw.ElapsedTicks /(10進数)Stopwatch.Frequency; 
               }); 

            #endregionの

            #regionのキャップ、フロア、中央// 寸法線の追加のvar lineMaxAnnotationは=

            
            新しいLineAnnotation()
            { // 上限 
                タイプ= LineAnnotationType.Horizo​​ntal、
                Y = USL、
                テキスト = " 上限:" + USL、
                カラー = OxyColors.Red、
                線種 = LineStyle.DashDashDot、
                StrokeThickness = 2 
            }。
            plotModel.Annotations.Add(lineMaxAnnotation)。

            VaRの lineMinAnnotation = 新しいLineAnnotation()
            { //下限 
                タイプ= LineAnnotationType.Horizo​​ntal、
                カラー = OxyColors.Blue、
                線種 = LineStyle.Dash、
                StrokeThickness = 2 
                Y = LSL、
                テキスト = " 下限:" + LSL 
            }。
            plotModel.Annotations.Add(lineMinAnnotation)。

            VaRの lineMean = 新しいLineAnnotation()
            { // 平均 
                タイプ= LineAnnotationType.Horizo​​ntal、 = OxyColors.Green、
                線種 = LineStyle.LongDash、
                StrokeThickness = 2 
                Y = 平均、
                テキスト = " 平均:" + 意味します
            }。
            plotModel.Annotations.Add(lineMean)。

            #endregion 

            #region最大值、最小值VARの分= 新しいScatterSeries()。
            VAR maxDataPoint = DateTimeAxis.CreateDataPoint(maxPoint.occurenceTime、maxPoint.val)。

             
            min.Points.Add(新しい ScatterPoint(maxDataPoint.X、maxDataPoint.Y、15 ));
            min.MarkerFill = OxyColor.FromAColor(20 、OxyColors.Red)。
            min.MarkerType = MarkerType.Circle。
            plotModel.Series.Add(分)。

            VaRの最大値= 新しいScatterSeries();
            VAR minDataPoint = DateTimeAxis.CreateDataPoint(minPoint.occurenceTime、minPoint.val)。
            max.Points.Add(新しい ScatterPoint(minDataPoint.X、minDataPoint.Y、15 )); 
            max.MarkerFill = OxyColor.FromAColor(20 MarkerType.Circle。、OxyColors.Yellow)。
            max.MarkerType =
            plotModel.Series.Add(最大)。

            #endregion

 

おすすめ

転載: www.cnblogs.com/ingstyle/p/11243304.html