Emil Stoichev's Blog

Just a few coding tips

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

 

Comments

Pieter said:

I get an Alpha version download banner when I try your demo.

# November 21, 2007 2:32 AM

Emil Stoichev said:

Pieter,

The chart control is developed with Silverlight 1.1 Alpha. Therefore you have to download the Alpha plug-in so as to be able to see the demo. Let me know if you need help with the installation of the plug-in or if you experience any problems seeing the demo.

# November 21, 2007 2:54 AM

Community Blogs said:

In my previous post I referred you to a tutorial how to make a simple line chart with Silverlight 1.1

# November 28, 2007 9:50 AM

subhash said:

hello sir..

i have to draw line chart like this . so can u explain the code stepwise step so i can understand the concept.. i am new to silverlight.

please u must think something form me its urgent...

Thanking You

# March 11, 2008 2:50 AM

Emil Stoichev said:

Hi subhash,

The concept of this line chart is based on the Polyline object. Did you read this article www.silverlightshow.net/.../2314.aspx Every step is explained there and you should be able to understand it. If you need just to use it you can drop it in your Silverlight project and just change the data file. If you have some specific questions I'll be glad to help you. Good luck.

# March 11, 2008 3:16 AM

Subhash said:

Hello Sir,

Thank you for warm reply..

yes i gone through that tutorial and up to canvas desiging i m clear but from this below code

axisX.X1 = this.AxisXLeftMargin;

axisX.Y1 = chartCanvas.Height - this.AxisYBottomMargin;

axisX.X2 = chartCanvas.Width - this.AxisXRightMargin;

axisX.Y2 = chartCanvas.Height - this.AxisYBottomMargin

i am not getting. where i have to write these code.

all code in same file or seprately.

please sir i am very new in silvelight. i just know how to write xaml code with javascript for event and how to call in hml.

you have also mention to drop something in your silverlight project.. sorry i didn't got it. sorry don't mind..

Thanking You

# March 26, 2008 4:35 AM

clement said:

i want to share with you guys a open source charting control called visifire that i happened to see in silverlight forum.

i am very much impressed by the features it offers. it supports silverlight 2 & has pretty cool animations

# May 9, 2008 2:48 AM

Emil Stoichev said:

Thanks, clement. I'm aware of Visifire and they are really great charts. This post was written before I knew for them (or may also before they were released). Thanks for sharing anyway.

# May 9, 2008 6:51 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)