10 changed files with 105 additions and 149 deletions
@ -1,96 +0,0 @@ |
|||||
using LiveChartsCore.SkiaSharpView; |
|
||||
using LiveChartsCore; |
|
||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data; |
|
||||
using System.Linq; |
|
||||
using System.Text; |
|
||||
using System.Threading.Tasks; |
|
||||
using CommunityToolkit.Mvvm.ComponentModel; |
|
||||
using LiveChartsCore.Kernel.Sketches; |
|
||||
using LiveChartsCore.SkiaSharpView.Painting; |
|
||||
using ScottPlot.Colormaps; |
|
||||
using System.Drawing; |
|
||||
using System.Windows.Media.TextFormatting; |
|
||||
using System.Xml.Linq; |
|
||||
using SkiaSharp; |
|
||||
using LiveChartsCore.Defaults; |
|
||||
using static System.Net.WebRequestMethods; |
|
||||
using System.Collections.ObjectModel; |
|
||||
using DyeingComputer.Properties; |
|
||||
using LiveChartsCore.Measure; |
|
||||
using LiveChartsCore.Motion; |
|
||||
using SunlightCentralizedControlManagement_SCCM_.Properties; |
|
||||
using static SunlightCentralizedControlManagement_SCCM_.UserClass.SqliteHelper; |
|
||||
using TouchSocket.Core; |
|
||||
using System.ComponentModel; |
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Windows; |
|
||||
using SunlightCentralizedControlManagement_SCCM_.View; |
|
||||
using LiveChartsCore.SkiaSharpView.Painting.Effects; |
|
||||
using LiveChartsCore.Drawing; |
|
||||
using LiveChartsCore.SkiaSharpView.Drawing.Geometries; |
|
||||
using System.Windows.Documents; |
|
||||
using System.Reflection; |
|
||||
|
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
||||
{ |
|
||||
public partial class ProductionPlanningModel : ObservableObject//ViewModelBase
|
|
||||
{ |
|
||||
//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), |
|
||||
}, |
|
||||
}; |
|
||||
public Axis[] YAxes { get; set; } = |
|
||||
{ |
|
||||
new Axis |
|
||||
{ |
|
||||
MinLimit = 0, |
|
||||
// TextSize = 20,
|
|
||||
LabelsDensity = 1, |
|
||||
Labels = MainWindowViewModel.Machines.AsEnumerable().Select(row=> row.Field<string>("name")).ToList(),//转换列名为机台
|
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
public ProductionPlanningModel() |
|
||||
{ |
|
||||
var r = new Random(); |
|
||||
var values1 = new ObservableCollection<ObservablePoint>(); |
|
||||
|
|
||||
for (var i = 0; i < 20; i++) |
|
||||
{ |
|
||||
values1.Add(new ObservablePoint(r.Next(10, 20), r.Next(0, 20))); |
|
||||
} |
|
||||
|
|
||||
Series = new ISeries[] |
|
||||
{ |
|
||||
// use the second type parameter to specify the geometry to draw for every point
|
|
||||
// there are already many predefined geometries in the
|
|
||||
// LiveChartsCore.SkiaSharpView.Drawing.Geometries namespace
|
|
||||
new ScatterSeries<ObservablePoint, RoundedRectangleGeometry> |
|
||||
{ |
|
||||
Values = values1, |
|
||||
Stroke = null, |
|
||||
GeometrySize = 10, |
|
||||
}, |
|
||||
|
|
||||
// You can also use SVG paths to draw the geometry
|
|
||||
// LiveCharts already provides some predefined paths in the SVGPoints class.
|
|
||||
|
|
||||
|
|
||||
// you can declare your own gemetry and use the SkiaSharp api to draw it
|
|
||||
|
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
public ISeries[] Series { get; set; } */ |
|
||||
|
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue