|
@@ -1,4 +1,8 @@
|
|
|
-using System;
|
|
|
+using LiveCharts;
|
|
|
+using LiveCharts.Configurations;
|
|
|
+using LiveCharts.Wpf;
|
|
|
+using SCADA_DAQ.Customer.Models.OEEData;
|
|
|
+using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
@@ -23,6 +27,19 @@ namespace SCADA_DAQ.Customer.Views.Uct
|
|
|
public UctDeviceChart()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
+ var mapper = Mappers.Xy<OeeAxisXYModels>()
|
|
|
+ .X(model => model.Indx)
|
|
|
+ .Y(model => model.Value);
|
|
|
+ Charting.For<OeeAxisXYModels>(mapper);
|
|
|
+ OeeValue.Values = new ChartValues<OeeAxisXYModels>();
|
|
|
+ List<double> values = new List<double>() { 0.3, 0.4, 0.5, 0.6, 0.8 };
|
|
|
+ List<double> Indxvalues = new List<double>() { 1, 2, 3, 4, 5 };
|
|
|
+ for (int i = 0; i < values.Count(); i++)
|
|
|
+ {
|
|
|
+ OeeValue.Values.Add(new OeeAxisXYModels { Indx = Indxvalues[i], Value = values[i] });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void CartesianChart_DataClick(object sender, LiveCharts.ChartPoint chartPoint)
|