Xamarin形成Teechart - 一致的渐变

时间:2015-09-15 11:36:32

标签: xamarin.forms teechart

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

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;

结果如下: enter image description here

问题在于我希望渐变在整个区域中保持一致,现在每个点下方都会绘制一条渐变线。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

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

  lineSeries.GradientRelative = false;