change-图表数据为0不要小数点

dev
liuwf 1 year ago
parent c805bfd1ce
commit dff10cc964

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>

@ -84,6 +84,10 @@ namespace Aucma.Core.BoxFoam.ViewModels
{
try
{
if (ProductionHourList!=null && ProductionHourList.Count>0)
{
ProductionHourList.Clear();
}
ProductionHourList = new List<string>();
List<WorkTime> listTime = _baseBomInfoServices.getWorkTime().Result;
foreach (WorkTime time in listTime)

@ -405,18 +405,21 @@
<lvc:CartesianChart.DataTooltip >
<lvc:DefaultTooltip SelectionMode="OnlySender" BulletSize="10" Foreground="Black"></lvc:DefaultTooltip>
</lvc:CartesianChart.DataTooltip>
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="12" LabelsRotation="0" DisableAnimations="True" Position="LeftBottom" Foreground="White">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" Step="1" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="18" Foreground="White" >
<lvc:Axis FontSize="18" Foreground="White" MinValue="0">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
@ -433,15 +436,15 @@
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding MaterialNameList}" FontSize="12" Foreground="White">
<lvc:Axis.Separator>
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="18" Foreground="White">
<lvc:Axis FontSize="18" Foreground="White" MinValue="0">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

@ -144,9 +144,9 @@
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="18" Foreground="White">
<lvc:Axis FontSize="18" Foreground="White" MinValue="0">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

@ -181,7 +181,7 @@
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15" MinValue="0" MaxValue="50">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

@ -111,7 +111,7 @@ namespace Aucma.Core.ProductOffLine.Business
Task.Run(() =>
{
Thread.Sleep(5000);
MaterialBarScanEvent("32160030000000910780", "192.168.1.19");
MaterialBarScan("32160030000000910780", "192.168.1.19");
// Thread.Sleep(1000);
// MaterialBarScanEvent("33160030000000910780", "192.168.1.20");
});
@ -122,7 +122,7 @@ namespace Aucma.Core.ProductOffLine.Business
/// </summary>
/// <param name="code"></param>
/// <param name="scannerIp">扫码器IP</param>
public void MaterialBarScanEvent(string code,string scannerIp)
public void MaterialBarScan(string code,string scannerIp)
{
int ScannerNo = scannerIp == Appsettings.app("Middleware", "Scanner1", "Ip") ? 1 : 2; // 确定是哪个扫码器
log.Info("扫码器ip:" + scannerIp +"编号:["+ScannerNo+ "]扫描到条码:" + code);

@ -355,7 +355,8 @@ namespace Aucma.Core.ProductOffLine.ViewModels
column2.DataLabels = true;
column2.Title = "产量";
column2.Values = achievement2;
column2.Foreground = Brushes.White;
column2.Foreground = Brushes.White;
// Achievement.Clear();
//Achievement.Add(column2);
if (Achievement.Count > 0)
@ -390,6 +391,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
column.Title = "型号";
column.Values = achievement;
column.Foreground = Brushes.White;
// x轴
MaterialNameList = null;
MaterialNameList = nameList;

@ -244,7 +244,7 @@
<TextBlock Text="当班小时产量统计" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}" DisableAnimations="True">
<lvc:CartesianChart Series="{Binding Achievement,UpdateSourceTrigger=PropertyChanged}" DisableAnimations="True">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15">
@ -255,9 +255,9 @@
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis FontSize="15" MinValue="0" >
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
@ -287,9 +287,9 @@
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis FontSize="15" MinValue="0">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
<lvc:Separator Step="1" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>

Loading…
Cancel
Save