This commit is contained in:
@@ -706,11 +706,20 @@ public partial class D7896ViewModel : ObservableObject
|
||||
TemperatureCurveModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Title = "温升 (℃)" });
|
||||
}
|
||||
|
||||
// 加热段曲线(红色)
|
||||
// 根据当前测量索引计算色相 (0 ~ 1)
|
||||
double hue = ((CurrentMeasurementIndex - 1) % 10) / 10.0; // 0, 0.1, 0.2 ... 0.9
|
||||
// 加热曲线颜色:饱和度0.9,亮度0.8
|
||||
var heatColor = OxyColor.FromHsv(hue, 0.9, 0.8);
|
||||
// 冷却曲线颜色:色相偏移0.5(互补色),饱和度0.6,亮度0.8(较淡)
|
||||
double coolHue = hue + 0.5;
|
||||
if (coolHue >= 1.0) coolHue -= 1.0;
|
||||
var coolColor = OxyColor.FromHsv(coolHue, 0.6, 0.8);
|
||||
|
||||
// 加热段曲线(红色系实线)
|
||||
var heatingSeries = new LineSeries
|
||||
{
|
||||
Title = $"第{CurrentMeasurementIndex}次测量 - 加热段",
|
||||
Color = OxyColors.Red,
|
||||
Title = $"第{CurrentMeasurementIndex}次 - 加热",
|
||||
Color = heatColor,
|
||||
StrokeThickness = 1.5
|
||||
};
|
||||
for (int i = 0; i < time.Length && time[i] <= 1.0; i++)
|
||||
@@ -719,13 +728,13 @@ public partial class D7896ViewModel : ObservableObject
|
||||
}
|
||||
TemperatureCurveModel.Series.Add(heatingSeries);
|
||||
|
||||
// 冷却曲线(蓝色虚线)
|
||||
// 冷却曲线(互补色,虚线)
|
||||
if (coolingPoints != null && coolingPoints.Count > 0)
|
||||
{
|
||||
var coolingSeries = new LineSeries
|
||||
{
|
||||
Title = $"第{CurrentMeasurementIndex}次测量 - 冷却段",
|
||||
Color = OxyColors.Blue,
|
||||
Title = $"第{CurrentMeasurementIndex}次 - 冷却",
|
||||
Color = coolColor,
|
||||
StrokeThickness = 1.5,
|
||||
LineStyle = LineStyle.Dash
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user