我想创建由曲线和曲线下的颜色组成的图形。为此,我编写了以下代码:
areaSeries = new AreaSeries()
{
StrokeThickness = 0,
LineStyle = OxyPlot.LineStyle.None,
Color = OxyColors.Transparent,
Fill = OxyColor.FromArgb(30, 102, 153, 0),
};
LinearAxis left = new LinearAxis();
left.Position = AxisPosition.Left;
left.AbsoluteMinimum = 0;
left.AbsoluteMaximum = 100;
left.MajorGridlineStyle = LineStyle.Dash;
LinearAxis bottom = new LinearAxis();
bottom.Position = AxisPosition.Bottom;
bottom.AbsoluteMinimum = 0;
bottom.AbsoluteMaximum = 80;
bottom.Minimum = 75;
bottom.Maximum = 80;
Model.Axes.Add(bottom);
Model.Axes.Add(left);
Model.Series.Add(areaSeries);
Model.Series.Add(Marker);
如果bottom.Maximum和bottom.Minimum之间的差异大于10个单位,则曲线下方的颜色将超过图形的颜色,否则为非。请查看所附图片。
底部最大-底部最小10>:
最大下限-最小下限<10:
如果有人可以帮助我解释这种情况的发生原因和出了什么问题,我将感到非常高兴。