Jump to content
Software FX Community

Adding animation to a bar chart


GarethHealy

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...