liuwf 1 year ago
parent 74a64f9f51
commit 24178b588f

@ -88,6 +88,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
{
ProductionHourList.Add(time.hourTime);
}
// 货道列表
List<BoxFoamData> list = _boxFoamDataServices.QueryAsync(x=>x.ProductLineCode.Equals("CX_02") && x.StationCode=="1005").Result;
@ -116,9 +117,22 @@ namespace Aucma.Core.BoxFoam.ViewModels
column.Title = "当日小时产量统计";
column.Values = achievement;
column.Foreground = Brushes.White;
Achievement.Add(column);
// Achievement.Add(column);
if (Achievement.Count > 0)
{
for(int i = 0; i < achievement.Count; i++)
{
Achievement.FirstOrDefault().Values[i] = achievement[i];
}
}
else
{
Achievement.Add(column);
}
#endregion
#region 按类型统计
MaterialNameList = new List<string>();
ChartValues<int> achievement2 = new ChartValues<int>();
@ -134,14 +148,24 @@ namespace Aucma.Core.BoxFoam.ViewModels
MaterialNameList.Add(item.Key);
achievement2.Add(flattenedList.Sum());
}
ModelStatistics.Clear();
// ModelStatistics.Clear();
var column2 = new ColumnSeries();
column2.DataLabels = true;
column2.Title = "当日型号产量统计";
column2.Values = achievement2;
column2.Foreground = Brushes.White;
ModelStatistics.Add(column2);
// ModelStatistics.Add(column2);
if (ModelStatistics.Count > 0)
{
for(int i=0;i< achievement2.Count; i++)
{
ModelStatistics.FirstOrDefault().Values[i] = achievement2[i];
}
}
else
{
ModelStatistics.Add(column2);
}
#endregion
}
@ -322,7 +346,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
foreach (var item in list)
{
if (item.Status == 1) StatusColor.Add("Green");
if (item.Status == 0) StatusColor.Add("Red");
if (item.Status == 2) StatusColor.Add("Red");
if (!string.IsNullOrEmpty(item.FixtureBoxType)) FixtureName.Add(item.FixtureBoxType);
if (!string.IsNullOrEmpty(item.Yield.ToString())) Production.Add(item.Yield.ToString());
// if (!string.IsNullOrEmpty(item.InternalTemperature.ToString())) InternalTemperature.Add(item.InternalTemperature.ToString());

@ -401,7 +401,7 @@
</Grid.ColumnDefinitions>
<UniformGrid Grid.Column="0">
<Grid Margin="10,10">
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}" LegendLocation="Top" Foreground="White">
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}" LegendLocation="Top" Foreground="White" DisableAnimations="True">
<lvc:CartesianChart.DataTooltip >
<lvc:DefaultTooltip SelectionMode="OnlySender" BulletSize="10" Foreground="Black"></lvc:DefaultTooltip>
</lvc:CartesianChart.DataTooltip>
@ -426,7 +426,7 @@
</UniformGrid>
<UniformGrid Grid.Column="1">
<Grid Margin="10,10">
<lvc:CartesianChart LegendLocation="Top" Series="{Binding ModelStatistics, UpdateSourceTrigger=PropertyChanged}" Foreground="White">
<lvc:CartesianChart LegendLocation="Top" Series="{Binding ModelStatistics, UpdateSourceTrigger=PropertyChanged}" Foreground="White" DisableAnimations="True">
<lvc:CartesianChart.DataTooltip>
<lvc:DefaultTooltip BulletSize="10" Foreground="Black"></lvc:DefaultTooltip>
</lvc:CartesianChart.DataTooltip>

Loading…
Cancel
Save