The Chart control, included in the Silverlight Toolkit, allows us to graphically display data. It turned out that this was something very simple to do, but not so obvious:
Code:
<chartingToolkit: Chart Margin = "109,62,116,64"
Title = "Chart Title">
<chartingToolkit: Chart.Axes>
<chartingToolkit: LinearAxis Orientation = "Y"
ShowGridLines = "False" />
chartingToolkit: Chart.Axes>
<chartingToolkit: Chart.DataContext>
<PointCollection>
<Point> 1.10 Point>
<Point> 2.20 Point>
<Point> 3.30 Point>
<Point> 4.40 Point>
PointCollection>
chartingToolkit: Chart.DataContext>
<chartingToolkit: ColumnSeries DependentValuePath = "X"
IndependentValuePath = "Y"
ItemsSource = "(Binding) '/>
chartingToolkit: Chart>
Here we can see that line 3 to 6 Axes property define our control chart. We are saying that we will have an orientation LinearAxis "Y" (the lines show the values of the data on that axis) and define ShowGridLines to false to avoid appearing.
Bookmarks