Xamarin Forms Teechart - 一致的渐变

Xamarin Forms Teechart - consistent gradient

所以我有一个区域系列,我想在其中使用渐变。我应用这些设置

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;

结果是这样的:

问题是我想让整个区域的渐变保持一致,现在每个点下面都画了一条渐变线。我该如何解决这个问题?

您需要为此使用 Steema.TeeChart.Styles.Area.GradientRelative property,例如:

  lineSeries.GradientRelative = false;