ChartControl.AnimationRecords Property
Provides access to a collection of animation records within a chart.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
ChartAnimationRecordCollection | A ChartAnimationRecordCollection object. |
Remarks
This animation is useful for 3D series.
Example
The following example demonstrates how to animate series points, so that their values are dynamically changed when displaying a chart.
To accomplish this, it is first necessary to add a trigger to a chart’s Triggers collection, which will start the Year1998Animation in response to the chart’s Loaded event. Then, to the ChartControl.AnimationRecords
collection, add a ChartAnimationRecord with a SeriesAnimation object.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-animate-a-series-points-argument-and-value-in-a-3d-chart-e384.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
x:Class="WpfApplication1.Window1" Height="500" Width="650">
<Grid>
<dxc:ChartControl x:Name="chart">
<dxc:ChartControl.Diagram>
<dxc:XYDiagram3D>
<!--region #series-->
<dxc:XYDiagram3D.Series>
<dxc:BarSeries3D x:Name="Year1998" >
<dxc:Series.Points>
<dxc:SeriesPoint Argument="Illinois" Value="423.72" />
<dxc:SeriesPoint Argument="Indiana" Value="178.71" />
<dxc:SeriesPoint Argument="Michigan" Value="308.84" />
<dxc:SeriesPoint Argument="Ohio" Value="348.54" />
<dxc:SeriesPoint Argument="Wisconsin" Value="160.27" />
</dxc:Series.Points>
<dxc:BarSeries3D.Label>
<dxc:SeriesLabel Visible="False"/>
</dxc:BarSeries3D.Label>
</dxc:BarSeries3D>
<!--endregion #series-->
</dxc:XYDiagram3D.Series>
</dxc:XYDiagram3D>
</dxc:ChartControl.Diagram>
<!--region #records-->
<dxc:ChartControl.AnimationRecords>
<dxc:ChartAnimationRecord x:Name="Year1998Animation" Progress="0">
<dxc:ChartAnimationRecord.Animations>
<dxc:SeriesAnimation TargetSeries="{Binding ElementName=Year1998}">
<dxc:SeriesAnimation.Actions>
<dxc:SeriesSeriesPointsAction EqualSpeed="True"
Sequential="True"
DelayPercentage="30"/>
</dxc:SeriesAnimation.Actions>
</dxc:SeriesAnimation>
</dxc:ChartAnimationRecord.Animations>
</dxc:ChartAnimationRecord>
</dxc:ChartControl.AnimationRecords>
<!--endregion #records-->
<!--region #triggers-->
<dxc:ChartControl.Triggers>
<EventTrigger RoutedEvent="dxc:ChartControl.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="0" To="1" Duration="0:0:3"
Storyboard.TargetName="Year1998Animation"
Storyboard.TargetProperty="Progress" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</dxc:ChartControl.Triggers>
<!--endregion #triggers-->
</dxc:ChartControl>
</Grid>
</Window>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AnimationRecords property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.