ArrowAnnotations color

Oystein Bjorke 10 років тому 0
This discussion was imported from CodePlex

Gala wrote at 2014-06-11 14:33:

Hello) Can anybody help me? I' m using oxyPlot for my wpf project, and i'm trying to display a lot of arrows with different colors.
  var arrow = new ArrowAnnotation();
  arrow .Text = number.ToString();
  if (number < 2) 
                    arrow .Color = OxyColors.Green;
   else 
                     arrow .Color = OxyColors.Red;
  arrow.StartPoint =  point + 5;
  arrow.EndPoint = point;
  arrow.YAxisKey = "Spread";
  SpreadModel.Annotations.Add(arrow);
The variable - number is always different, but arrows are always the same color(depends of what number was the last).
Thanks