Exemplo n.º 1
0
 public void InitAxisSetting(AxisSetting xAxisSetting)
 {
     if (xAxisSetting == null)
     {
         return;
     }
     if (_XAxis == null)
     {
         _XAxis = new DateAxis();
     }
     _XAxis.MinTime          = xAxisSetting.BeginTime ?? DateTime.Now.AddHours(-1);
     _XAxis.MaxTime          = xAxisSetting.EndTime ?? DateTime.Now.AddHours(1);
     _XAxis.Title            = xAxisSetting.Title;
     _XAxis.MinorUnit        = xAxisSetting.MinorUnit ?? DateUnit.Minute;
     _XAxis.MajorUnit        = xAxisSetting.MajorUnit ?? DateUnit.Minute;
     _XAxis.MinorStep        = xAxisSetting.MinorStep ?? 5;
     _XAxis.MajorStep        = xAxisSetting.MajorStep ?? 15;
     _XAxis.MoveMinLimitTime = xAxisSetting.MoveMinLimitTime;
     _XAxis.MoveMaxLimitTime = xAxisSetting.MoveMaxLimitTime;
 }
Exemplo n.º 2
0
        public LineSeries(DateAxis XAxis, Axis YAxis, double drawHeight)
        {
            _points               = new List <DataPoint>();
            _XAxis                = XAxis;
            _YAxis                = YAxis;
            _drawHeight           = drawHeight;
            _path                 = new Path();
            _path.StrokeThickness = 1.5;
            _path.Stroke          = Brushes.DarkBlue;
            _pointWidth           = _pointHeight = 8;
            var pathFigure = new PathFigure();

            pathFigure.Segments = new PathSegmentCollection();

            _pathGeometry.Figures = new PathFigureCollection();
            _pathGeometry.Figures.Add(pathFigure);

            _pathGroup = new GeometryGroup();
            _pathGroup.Children.Add(_pathGeometry);

            this._path.Data = _pathGroup;
        }
Exemplo n.º 3
0
 public DateAxis(DateAxis rhs)
 {
     TitleSytle = rhs.TitleSytle;
     //待完善
 }