//非白色,最大曲线 public void DrawNotWhiteLightMaximum() { graphNotWhiteLightMaximum = DimmingCurveChart.AddLineGraph(DataSourceNotWhiteLightMaximum, Colors.Red, 2, "最大值"); for (int i = 0; i < 41; i++) { Point point = new Point(CurrentArray[i], PercentageNotWhiteLightMaximumArray[i]); DataSourceNotWhiteLightMaximum.AppendAsync(base.Dispatcher, point); } }
//实际曲线 public void DrawPercentage() { DimmingCurveChart.Children.Remove(graphPercentage); DataSourcePercentage = new ObservableDataSource <System.Windows.Point>(); graphPercentage = DimmingCurveChart.AddLineGraph(DataSourcePercentage, Colors.Black, 2, "实际值"); for (int i = 0; i < 41; i++) { Point point = new Point(CurrentArray[i], (double)myDataTable.Rows[i][2]); DataSourcePercentage.AppendAsync(base.Dispatcher, point); } }