Creating Line Charts - Page 1
       by kirupa  |  23 September 2006

You see line charts almost all the time. If you administer a web site, your log software probably uses a few charts to display your site's traffic. If you are into stock trading, charts are used extensively to display a stock's fluctuation over a period of time. There are numerous other examples of charts used everyday, but have you ever thought about how these charts are created?

Before answering that question for you, and to make up for my extremely boring intro paragraph, let me first show you the ASP.net chart this tutorial will help you deconstruct:

Don't let the static image trick you. Refresh this page or open the chart in a new window and keep refreshing that page. Notice that the chart looks different each time the page is loaded!

Since the above example was written entirely in code, in this tutorial I will first devote some time explaining how to approach designing a line chart before delving into how the code corresponds to our design.

Designing this Chart
There are two main features I focused on when designing this chart:

  1. Being able to easily resize and adjust the chart size.

  2. Allowing the chart to automatically adjust to wide ranges and quantities of data.

There are other features also, of course, but I will focus my attention on these two because I think they are most tricky to nail down properly in code. In the next page, I will elaborate on the above two features are designed.

Onwards to the next page!

1 | 2 | 3 | 4 | 5 | 6




SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple.