Recently I got a task of developing a Silverlight user control that displays charts for various data sets. This implied that I study and understand the charts provided in the Silverlight toolkit. Therefore, I started learning the How-Tos of it. Although there is a sample application provided with the toolkit but the code is quite lengthy and some people like me prefer a quick start before diving into the details. Therefore I simplified the example and now it is being shared so that others can take advantage of it.
The basic ingredients include instances of
- Chart
- DataPointSeries (When it is desired to draw, Pie, Line, Bar, Column, Bubble and Scatter graph)
- An instance of IEnumerable interface
Following is the code that displays a pie chart. Comments have been included so that the code is better understood.
Don't forget to import the following
using System.Windows.Controls.DataVisualization.Charting;
using System.Windows.Data;
Assalam-O-Alaikum
ReplyDeleteIm assuming that its the same charting control,i just played with it:
"Microsoft Chart Controls for Microsoft .NET Framework 3.5"
It was awesome....
Owais Here