May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Now we have to write code to show data in the Chart control. Imagine you want to get the total cost that customers paid to your company for orders, divided by year. To accomplish this, we first need a custom class for storing the year and the total amount per year. Add a new class to the project and name it CustomerData. The code for the new class is the following:

Then we can write the following LINQ query, which creates an IEnumerable(Of CustomerData) (the custom class that was defined at the beginning of this section) and that can be bound to the chart:
Notice how the Let keyword allows declaring a temporary variable ...
Read now
Unlock full access