|
|
@ -25,18 +25,13 @@ namespace DyeingComputer.ViewModel |
|
|
|
{ |
|
|
|
public partial class HistoryRecordsViewModel : ObservableObject |
|
|
|
{ |
|
|
|
//数据
|
|
|
|
public ISeries[] _series; |
|
|
|
public ISeries[] Series { get { return _series; } set { _series = value;OnPropertyChanged(); } } |
|
|
|
//x轴
|
|
|
|
public ICartesianAxis[] _xAxes; |
|
|
|
public ICartesianAxis[] XAxes { get {return _xAxes; } set { _xAxes = value; OnPropertyChanged(); } } |
|
|
|
|
|
|
|
public static ISeries[] Series { get; set; } |
|
|
|
//x轴时间格式
|
|
|
|
public Axis[] XAxes { get; set; } = |
|
|
|
{ |
|
|
|
new DateTimeAxis(TimeSpan.FromSeconds(5) , date => date.ToString("yyyy-MM-dd HH:mm")) |
|
|
|
{ |
|
|
|
CrosshairLabelsBackground = SKColors.DarkGray.AsLvcColor(), |
|
|
|
CrosshairLabelsPaint = new SolidColorPaint(SKColors.DarkSlateBlue, 1), |
|
|
|
CrosshairPaint = new SolidColorPaint(SKColors.DarkSlateGray, 1), |
|
|
|
}, |
|
|
|
}; |
|
|
|
//颜色
|
|
|
|
private static readonly SKColor s_blue = new SKColor(25, 118, 210); |
|
|
|
private static readonly SKColor s_blue_0 = new SKColor(25, 18, 210); |
|
|
@ -224,6 +219,7 @@ namespace DyeingComputer.ViewModel |
|
|
|
STTC_values = new ObservableCollection<DateTimePoint>(STTC_items); |
|
|
|
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items); |
|
|
|
} |
|
|
|
//数据
|
|
|
|
Series = new ISeries[] |
|
|
|
{ |
|
|
|
new LineSeries<DateTimePoint> |
|
|
@ -348,6 +344,16 @@ namespace DyeingComputer.ViewModel |
|
|
|
ScalesYAt = 1, |
|
|
|
}, //附缸3 液位
|
|
|
|
}; |
|
|
|
//x轴时间格式
|
|
|
|
XAxes = new ICartesianAxis[] |
|
|
|
{ |
|
|
|
new DateTimeAxis(TimeSpan.FromSeconds(5) , date => date.ToString("yyyy-MM-dd HH:mm")) |
|
|
|
{ |
|
|
|
CrosshairLabelsBackground = SKColors.DarkGray.AsLvcColor(), |
|
|
|
CrosshairLabelsPaint = new SolidColorPaint(SKColors.DarkSlateBlue, 1), |
|
|
|
CrosshairPaint = new SolidColorPaint(SKColors.DarkSlateGray, 1), |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|