public override void DrawOrMove(ChartPoint previousDrawn, ChartPoint current, int index, ChartCore chart) { if (IsNew) { VerticalLine.X1 = current.ChartLocation.X; VerticalLine.X2 = current.ChartLocation.X; VerticalLine.Y1 = chart.DrawMargin.Height; VerticalLine.Y2 = chart.DrawMargin.Height; HorizontalLine.X1 = current.ChartLocation.X - DeltaX; HorizontalLine.X2 = current.ChartLocation.X; HorizontalLine.Y1 = chart.DrawMargin.Height; HorizontalLine.Y2 = chart.DrawMargin.Height; if (Shape != null) { Canvas.SetLeft(Shape, current.ChartLocation.X - Shape.Width / 2); Canvas.SetTop(Shape, chart.DrawMargin.Height); } if (DataLabel != null) { Canvas.SetTop(DataLabel, chart.DrawMargin.Height); Canvas.SetLeft(DataLabel, current.ChartLocation.X); } } if (HoverShape != null) { HoverShape.Width = Shape != null ? (Shape.Width > 5 ? Shape.Width : 5) : 5; HoverShape.Height = Shape != null ? (Shape.Height > 5 ? Shape.Height : 5) : 5; Canvas.SetLeft(HoverShape, current.ChartLocation.X - HoverShape.Width / 2); Canvas.SetTop(HoverShape, current.ChartLocation.Y - HoverShape.Height / 2); } if (chart.View.DisableAnimations) { VerticalLine.X1 = current.ChartLocation.X; VerticalLine.X2 = current.ChartLocation.X; VerticalLine.Y1 = current.ChartLocation.Y; VerticalLine.Y2 = current.ChartLocation.Y - DeltaY; HorizontalLine.X1 = current.ChartLocation.X - DeltaX; HorizontalLine.X2 = current.ChartLocation.X; HorizontalLine.Y1 = current.ChartLocation.Y - DeltaY; HorizontalLine.Y2 = current.ChartLocation.Y - DeltaY; if (Shape != null) { Canvas.SetLeft(Shape, current.ChartLocation.X - Shape.Width / 2); Canvas.SetTop(Shape, current.ChartLocation.Y - Shape.Height / 2); } if (DataLabel != null) { DataLabel.UpdateLayout(); var xl = CorrectXLabel(current.ChartLocation.X - DataLabel.ActualWidth * .5, chart); var yl = CorrectYLabel(current.ChartLocation.Y - DataLabel.ActualHeight * .5, chart); Canvas.SetLeft(DataLabel, xl); Canvas.SetTop(DataLabel, yl); } return; } var animSpeed = chart.View.AnimationsSpeed; VerticalLine.BeginAnimation(Line.X1Property, new DoubleAnimation(current.ChartLocation.X, animSpeed)); VerticalLine.BeginAnimation(Line.X2Property, new DoubleAnimation(current.ChartLocation.X, animSpeed)); VerticalLine.BeginAnimation(Line.Y1Property, new DoubleAnimation(current.ChartLocation.Y, animSpeed)); VerticalLine.BeginAnimation(Line.Y2Property, new DoubleAnimation(current.ChartLocation.Y - DeltaY, animSpeed)); HorizontalLine.BeginAnimation(Line.X1Property, new DoubleAnimation(current.ChartLocation.X - DeltaX, animSpeed)); HorizontalLine.BeginAnimation(Line.X2Property, new DoubleAnimation(current.ChartLocation.X, animSpeed)); HorizontalLine.BeginAnimation(Line.Y1Property, new DoubleAnimation(current.ChartLocation.Y - DeltaY, animSpeed)); HorizontalLine.BeginAnimation(Line.Y2Property, new DoubleAnimation(current.ChartLocation.Y - DeltaY, animSpeed)); if (Shape != null) { Shape.BeginAnimation(Canvas.LeftProperty, new DoubleAnimation(current.ChartLocation.X - Shape.Width / 2, animSpeed)); Shape.BeginAnimation(Canvas.TopProperty, new DoubleAnimation(current.ChartLocation.Y - Shape.Height / 2, animSpeed)); } if (DataLabel != null) { DataLabel.UpdateLayout(); var xl = CorrectXLabel(current.ChartLocation.X - DataLabel.ActualWidth * .5, chart); var yl = CorrectYLabel(current.ChartLocation.Y - DataLabel.ActualHeight * .5, chart); Canvas.SetLeft(DataLabel, xl); Canvas.SetTop(DataLabel, yl); } }