通过下面的方法试了,没有达到想要的效果,需要实现的是 if (data.S11 > -18) 大于-18的Yellow,小于的红色。
float previousX, previousY;
int sequentialIncrement, sequentialDecrement;
private void Series_SymbolRendered(object sender, RenderSymbolEventArgs e)
{
if (e.Index > 0)
{
Color lineColor;
DataItem data = (DataItem)e.Item;
if (data.S11 > -18)
{
lineColor = Color.Yellow;
}
else
{
lineColor = Color.Red;
}
e.Engine.SetStroke(new SolidBrush(lineColor));
e.Engine.SetStrokeThickness(0.5);
e.Engine.DrawLine(previousX, previousY, e.Point.X, e.Point.Y);
}
previousX = e.Point.X;
previousY = e.Point.Y;
}
|