This commit is contained in:
xyy
2026-05-29 21:16:12 +08:00
parent 5e72a9aefa
commit 84df130973
4 changed files with 19 additions and 10 deletions

View File

@@ -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
};