Report Adding animation to a bar chart in General Posted October 27, 2008 I have just started using Chart FX for WPF and am trying to create an animation. However, I don't understand how I would reference the points in XAML. For instance, when the chart is loaded, i want to animate the bars on a bar chart to move into position. <ChartFX:Chart.Triggers> <EventTrigger RoutedEvent="ChartFX:Chart.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="mainChart" Storyboard.TargetProperty="AxisY"> <LinearDoubleKeyFrame KeyTime="0:0:0" Value="0" /> <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2"/> <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="0.8"/> <LinearDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="mainChart" Storyboard.TargetProperty="AxisY"> <LinearDoubleKeyFrame KeyTime="0:0:0" Value="0" /> <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2"/> <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="0.8"/> <LinearDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </ChartFX:Chart.Triggers> Obliviously, AxisY isnt a valid target property. Sorry if my explanation is vague. Any help would be appreciated.
Adding animation to a bar chart
in General
Posted
I have just started using Chart FX for WPF and am trying to create an animation. However, I don't understand how I would reference the points in XAML.
For instance, when the chart is loaded, i want to animate the bars on a bar chart to move into position.
<ChartFX:Chart.Triggers> <EventTrigger RoutedEvent="ChartFX:Chart.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="mainChart" Storyboard.TargetProperty="AxisY"> <LinearDoubleKeyFrame KeyTime="0:0:0" Value="0" /> <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2"/> <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="0.8"/> <LinearDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="mainChart" Storyboard.TargetProperty="AxisY"> <LinearDoubleKeyFrame KeyTime="0:0:0" Value="0" /> <LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2"/> <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="0.8"/> <LinearDoubleKeyFrame KeyTime="0:0:0.56" Value="1.0"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </ChartFX:Chart.Triggers>
Obliviously, AxisY isnt a valid target property. Sorry if my explanation is vague. Any help would be appreciated.