Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
2665b6e6c2
3 files changed
+18
-14
No files matched your search
@@ -57,7 +57,6 @@
|
|||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Remark}" Width="*" Binding="{Binding Remark}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.Remark}" Width="*" Binding="{Binding Remark}" IsReadOnly="True"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<lvc:CartesianChart Margin="0,300,0,0" x:Name="chart"
|
<lvc:CartesianChart Margin="0,300,0,0" x:Name="chart" Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}"/>
|
||||||
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -52,7 +52,6 @@ namespace DyeingComputer.View
|
|||||||
HistoryRecordsViewModel.stime = (gridH.Columns[5].GetCellContent(gridH.Items[rownum]) as TextBlock).Text;//定位第1列,
|
HistoryRecordsViewModel.stime = (gridH.Columns[5].GetCellContent(gridH.Items[rownum]) as TextBlock).Text;//定位第1列,
|
||||||
HistoryRecordsViewModel.etime = (gridH.Columns[6].GetCellContent(gridH.Items[rownum]) as TextBlock).Text;//定位第6列
|
HistoryRecordsViewModel.etime = (gridH.Columns[6].GetCellContent(gridH.Items[rownum]) as TextBlock).Text;//定位第6列
|
||||||
HistoryRecordsViewModel.history_ = true;
|
HistoryRecordsViewModel.history_ = true;
|
||||||
// chart.Series = HistoryRecordsViewModel.Series;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,18 +25,13 @@ namespace DyeingComputer.ViewModel
|
|||||||
{
|
{
|
||||||
public partial class HistoryRecordsViewModel : ObservableObject
|
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 = new SKColor(25, 118, 210);
|
||||||
private static readonly SKColor s_blue_0 = new SKColor(25, 18, 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);
|
STTC_values = new ObservableCollection<DateTimePoint>(STTC_items);
|
||||||
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items);
|
STLC_values = new ObservableCollection<DateTimePoint>(STLC_items);
|
||||||
}
|
}
|
||||||
|
//数据
|
||||||
Series = new ISeries[]
|
Series = new ISeries[]
|
||||||
{
|
{
|
||||||
new LineSeries<DateTimePoint>
|
new LineSeries<DateTimePoint>
|
||||||
@@ -348,6 +344,16 @@ namespace DyeingComputer.ViewModel
|
|||||||
ScalesYAt = 1,
|
ScalesYAt = 1,
|
||||||
}, //附缸3 液位
|
}, //附缸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),
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user