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.