Emil Stoichev's Blog

Just a few coding tips

November 2007 - Posts

Consume data from Astoria service using the Astoria Silverlight API

In my previous post I referred you to a tutorial how to make a simple line chart with Silverlight 1.1. With this chart we were able to load data from an exported Excel XML Spreadsheet or from a XML serialized list of Point objects. I thought it would be great if the chart can consume data from a web service and thus stay updated without any user intervention. I decided to use Astoria service - it is new, unexplored, easy to understand and to use, the payload is low, etc. I believe that Astoria will be used by a lot AJAX-enabled and rich internet applications. If you are not familiar with Astoria go to its official labs site and learn! The technology is still in an early development phase and there is yet only a CTP version but you can find enough info to get started. Also there is a couple of useful blogs: Project Astoria Team Blog, Mike Flasko's Blog, Pablo Castro's blog.

Yesterday I continued my series of articles regarding how to build a simple line chart with Silverlight 1.1 (read here). I explained how to make an ADO.NET Entity Model, create Astoria service and then consume it from Silverlight. The sample chart loads data from a Northwind database and then represents it in a line chart. It is a pretty straight-forward way to keep the chart alive. The source code is also included (ASP.NET 3.5 app + silverlight control library + silverlight project) so you can try and use it for your needs. Prerequisites: Visual Studio 2008 Beta2, the Silverlight 1.1 Alpha Tools, the Astoria toolkit (VS2008 Beta2 Refresh) and the ADO.NET Entity Framework Beta 2.

How to build simple line chart with Silverlight 1.1

Today I've published an article on how to build a line chart control with Silverlight 1.1 in SilverlightShow.net. The chart allows you to load data from an exported Excel XML Spreadsheet and a custom XML serialized array of points. The goal of the article is to give a Silverlight solution of how to visualize data in a line chart and let non-technical staff maintain it.

The article shows how to use basic framework elements and transformations, how to load XML in Silverlight, how to create and include in ASP.NET project a Silverlight class library and Silverlight project. 

The full source code is included in the article so you can download and examine it yourself.

Check out the live demo.

Simple Silverlight Line Chart

 

More Posts