Under: “3. How to create basic Pie Chart in XAML only :” there is some code to implement the pie chart in XAML only. Adding this code doesn’t deliver the pie chart though. Do I have to add a reference of some sort? Thx.

]]>By: Indrajithttps://petermcg.wordpress.com/2008/05/18/silverlight-20-pie-chart/#comment-318
Tue, 27 Jan 2009 12:14:22 +0000http://petermcg.wordpress.com/2008/05/18/silverlight-20-pie-chart/#comment-318Excellent I have used your piechart to showcase sales dashboard but in semicircular speedometer or gauge way and also made business object to read KPI from xml or list…it works excellent
]]>By: chaitanya pednekarhttps://petermcg.wordpress.com/2008/05/18/silverlight-20-pie-chart/#comment-313
Tue, 06 Jan 2009 11:16:24 +0000http://petermcg.wordpress.com/2008/05/18/silverlight-20-pie-chart/#comment-313Hi peter,
I am very interested by your work about SilverLight charts. i am extremly fresher to this silverlight technology. i want to draw a simple pie chart , so please help me.

Thanks very much for your feedback. With the release of charting support provided in the Silverlight Toolkit I’ve not updated the pie-chart any further. I may get time to review this decision early next year and if so the points you raise around databinding will be a priority.

…not sure if that’s going to look any good, so here it is in unescaped form…

Anyway, the first problem was that Percentage was not a dependency property. I fixed that. However it still doesn’t quite work. I know that the DataContext for the ItemTemplate works because the text for the TextBlock binds correctly. It seems that the DataContext isn’t available within the PieSegment.

There was an error message stating that PieSegment wasn’t providing the data item (it was null) because PieSegment wasn’t a FrameworkElement, so I changed the base class to that, and the warning went away. But still no banana.

Oh, and a breakpoint in the getter of my property is not hit (apart from the first TextBlock binding), so I know it’s not reading the value.

This is a real shame because I was super excited about having a pie chart as part of my item template. I think it would be very visually striking in my application.

I’m no data binding guru, but I’m not sure that it’s right to define a binding within an instance of the observable collection here. Should PieSegmentCollection implement some other kind of interface or have a different base class?