Hi!
I have a requirement where when I click on the pie chart i want to add explode animation to the wedge that is clicked on. Can you please tell me how i can do that.
Thanks and regards,
Usha.
here you go:
private void XamWebChart_DataItemMouseLeftButtonDown(object sender, DataItemMouseEventArgs e) { FrameworkElement el = e.Element as FrameworkElement; if (el != null) { Dictionary<Type, object> tags = el.Tag as Dictionary<Type, object>; if (tags != null && tags.ContainsKey(typeof(DataPoint))) { DataPoint dP = tags[typeof(DataPoint)] as DataPoint; dP.ChartParameters.Add(new ChartParameter(ChartParameterType.Exploded, true)); dP.ChartParameters.Add(new ChartParameter(ChartParameterType.ExplodedAnimation, new Animation())); } } }
Thanks.
I was trying to get the click event of datapoint & display some info regarding it. Your post helps me to catch the Datapoint & its Lable & Value.
You can find discussions on methods for various series on the forums by searching for the event by name. Here's one example.
http://community.infragistics.com/forums/p/38590/221341.aspx#221341
Unfortunately the method currenly varies a bit depending on which series type you are using.
Hope this helps!
-Graham
Is there a version of this that will work for non-pie charts? While the tags dictionary exists for pie charts, it seems to be null for other chart types. Thanks!