Hi!
I have a requirement to have a pie chart and animation on that. Can I have on mouseover glow the datapoint or show it as an exploded one etc. After mouseover on mouse leave can I again set it back to the original pie chart. Can you please also suggest any other kind of animation I can have on the pie chart. Thanks for your help.
Thanks and regards,
Usha.
this isn't a feature of the chart, but you can make it happen using code like this:
private void XamWebChart_DataItemMouseEnter(object sender, Infragistics.Silverlight.Chart.DataItemMouseEventArgs e) { Path wedgePath = e.Element as Path; if (wedgePath != null) { ColorAnimation yellowAnimation = new ColorAnimation(); yellowAnimation.From = Colors.Yellow; yellowAnimation.Duration = TimeSpan.FromSeconds(1); Storyboard glow = new Storyboard(); glow.Children.Add(yellowAnimation); Storyboard.SetTarget(yellowAnimation, wedgePath.Fill); Storyboard.SetTargetProperty(yellowAnimation, new PropertyPath("Color")); glow.Begin(); } }
<igChart:XamWebChart DataItemMouseEnter="XamWebChart_DataItemMouseEnter"> <igChart:XamWebChart.Series> <igChart:Series ChartType="Pie"> <igChart:Series.DataPoints> <igChart:DataPoint Value="1" Fill="Red" /> <igChart:DataPoint Value="1" Fill="Green" /> <igChart:DataPoint Value="1" Fill="Blue" /> </igChart:Series.DataPoints> </igChart:Series> </igChart:XamWebChart.Series> </igChart:XamWebChart>