|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionMicrosoft has just launched a very rich chart control for .NET web and windows forms applications. Let’s take a look in some features from it. Prerequisites
Chart TypesThe following chart types are available:
You still have the option to combine more than one chart type. Bind TypesThe following options are available to be used as bind types for your application charts:
How to...The examples and documentation are really good and to work with the new Microsoft Chart control is very straightforward. Drag and drop a chart control, set properties in design and / or runtime and it’s done! NamespaceThe namespace you are going to use is System.Web.UI.DataVisualization.Charting. Main properties
ExamplesThe following code uses two arrays to create a simple pie chart: double[] yValues = { 10, 27.5, 7, 12, 45.5};
string[] xNames = { “Mike”, “John”, “William”, “George”, “Alex” };
myChart.Series[0].Points.DataBindXY(xNames, yValues);
Output:
Picture 1: Pie chart created with array databind. Using the same code but changing some values will produce the following bar chart:
Picture 2: Column chart created with an array databind. More FeaturesThis new control set is really rich on the level of customization allowed. Some other features of the new Microsoft Chart control includes:
If you want to get more information, take a look in the documentation, check over 200 examples included on the samples or visit the Chart Forum.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||