private void BarGraphAnimations() { // Set animation on Bar Graph upon loading of the window. //Animation for Production and Aanvoer. DoubleAnimation moveAnimation = new DoubleAnimation(); moveAnimation.From = MainChart.TransformToAncestor(this).Transform(new Point(0, 0)).Y; moveAnimation.To = MainChart.ActualHeight / 1.57; moveAnimation.Duration = TimeSpan.FromMilliseconds(4000); BarSeriesProductie.BeginAnimation(Canvas.HeightProperty, moveAnimation); BarSeriesAanvoer.BeginAnimation(Canvas.HeightProperty, moveAnimation); }