Using the ASP.NET Chart Control
page 2 of 5
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 48434/ 47

Overview of the Chart Control

Everything begins with the Chart control; the chart control defines all of the parameters and methods required to show charts in a .NET application.  Each chart can have one or more titles that appear at the top of the chart.  It can also have one or more legends that make up the various information groups in the chart.  There can be one or more legends, and the legend can be docked to the top, bottom, left, or right side of the chart.

Each chart has a chart area that defines the region to draw the chart in.  This area has a variety of settings regarding the X or Y axis, 3D chart rendering, the inner position of the chart, and more.  The ChartArea object is the key component that makes up the chart, because it tells the chart data where to live, so to speak.

The groupings of data, or information groups as I mentioned before, represents the Series object.  The series is exactly that; a series of data elements that representsss one information group.  I'll provide an example later, but know that a Series stores one or more DataPoint objects.  The DataPoint class represents the X/Y values to show on the chart.

To give you an example of the coorelation between Series and DataPoints, imagine this.  Suppose you wanted to create a coorelation between how well various products at a store sell in relation to each other.  This coorelation tracks total net sales as compared to the year.  So in a chart scenario, the Y axis running north would represent the net sales, and the X axis running east would represent the years.

In the chart control, each product would represent a series.  A series would consist of multiple DataPoint objects, one per year, which would have its XValue property set to the year and its YValues property (there can be multiple values to accommodate certain kinds of charts) would reference the net sales.  This is how the two objects coorelate.


View Entire Article

User Comments

Title: o   
Name: o
Date: 2012-12-03 3:54:11 AM
Comment:
o
Title: complaint   
Name: salman
Date: 2012-10-05 1:32:49 AM
Comment:
not goog
Title: Test   
Name: Test
Date: 2012-09-07 6:11:24 AM
Comment:
Test
Title: Nothing   
Name: Sean
Date: 2011-11-13 10:30:55 PM
Comment:
There's no article to read......
Title: it doesn't work   
Name: EnriqueAguilar
Date: 2010-12-23 1:35:26 PM
Comment:
Copy the complete example and does not work, shipping the example copied and error
Error executing child request for ChartImg.axd.
You can say what'S wrong?
code: can not send
Title: Good One   
Name: B.Raj
Date: 2010-11-17 2:19:44 AM
Comment:
Good article
Title: brainy   
Name: gayathri
Date: 2010-09-23 2:25:18 AM
Comment:
great article
thank you so much
Title: Great article   
Name: Kedar Periyapatna
Date: 2009-10-09 9:36:46 PM
Comment:
Hey ... i really appreciate your work .. very simple and clear explanation of asp.net Chart ... I do have one question ... as in WPF charts .. can I highlight every point of intersection b/w X and Y point by a thick dot .... thank u again
Title: MS CHART IS VERY GOOD   
Name: MOHAMMAD JAVED
Date: 2009-08-29 12:29:22 AM
Comment:
I USED MS CHART CONTROL ON AN APPLICATION IT HAS ALL FEATURES BUT SOME FEATURES ARE NOT MENTIONED.
BUT ITS IMPLEMENTATION AND USE ARE VERY EASY.
Title: Loving the MS Chart Control   
Name: Duncan
Date: 2009-03-30 10:28:22 PM
Comment:
I used the MSCC to build an application to track my mass(kg), body-fat(%) and body-water(%). It was a little intimidating at first, but by the end of a week I was comfortable with the control. It can be hard to set up on an ISP as it expects installation (not just upload of .dll to your /bin directory) and/or seems to require write permissions (even when set to persist the image to memory), but YMMV -- I'm happy with it. I really appreciated all the examples the author provided, which is also why I appreciate this article! Thanks!

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 1:36:17 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search