所以我有一个区域系列,其中我想使用渐变。我应用这些设置“
lineSeries.LinePen.Width = 5;
lineSeries.Color = Color.Transparent;
lineSeries.AreaBrush.Gradient.StartColor = Color.FromRgb (219, 233, 255);
lineSeries.AreaBrush.Transparency = 20;
lineSeries.AreaBrush.Gradient.EndColor = Color.Transparent;
lineSeries.AreaBrush.Gradient.Visible = true;
lineSeries.LinePen.Color = Color.FromRgb (219, 233, 255);
lineSeries.AreaLinesPen.Visible = false;
问题在于我希望渐变在整个区域中保持一致,现在每个点下方都会绘制一条渐变线。我该如何解决这个问题?
答案 0 :(得分:1)
您需要使用Steema.TeeChart.Styles.Area.GradientRelative property,例如:
lineSeries.GradientRelative = false;