Let your Reports in line with .netCHARTING 4.2

By Mahesh Chand Jan 23 2009
Recently, we launched C# Corner 3.0, which is redesigned and rewritten using Visual Studio 2005 and .NET Framework 2.0. One of the newest features among dozens of new features is interactive reporting for site statistics and it was made easy by using .netCHARTING 4.2.
    • Like
    • Love It
    • Awesome
    • Interesting
    • It's Okay
    • Thumbs Down
  • 20.8k
  • 0

Recently, we launched C# Corner 3.0, which is redesigned and rewritten using Visual Studio 2005 and .NET Framework 2.0. One of the newest features among dozens of new features is interactive reporting for site statistics such as number of users, what country they are from, what browser they are using with version number, how many of them have subscribed to the newsletter, and so on. All of these reports were made easy by using .netCHARTING 4.2.

Installation and Visual Studio 2005 Integration

You may download a free developer version of .netCHARTING from http://www.dotnetcharting.com/download.aspx.  The developer version is fully functional and does not timeout; the only difference between it and a licensed copy is the “not for production use” branding.  Installation of .netCHARTING is pretty straight forward. After downloading .netCHARTING, you simply copy all files in a folder and create a virtual directory on IIS. I created a virtual directory called “dotnetcharting”. After that, you follow “Illustrated QuickStart” document to create sample application and run the sample applications.

Let’s Get Started

This section illustrates how to add .netCHARTING to a Web application and use it to create some charts and reports.

Create a Web Application

Create a Web application using Visual Studio 2005 and copy Database folder from the dotnetcharting folder, where you unzipped the dotnetcharting zip file. Also, copy the dotnetCHARTING.dll library from the bin folder of dotnetcharting to your application’s bin folder. After that, add reference to dotnetCHARTING.dll by using the Add Reference option of your project and browsing the assembly located in the appropriate folder.

Adding .netCHARTING Reference

If you would like to add design time support of .netCHARTING, you can do so by right clicking on the Toolbox in Visual Studio, select Add Tab and give “Charting Controls” name to the new tab. After creating the tab, right click on the new tab and select “Choose Items” menu item, which will let you browse the assemblies. Browse dotnetCHARTING.dll assembly.


 
Figure 1.

After adding dotnetCHARTING.dll, the Charting Controls tab looks like Figure 2.

Figure 2. Charting Controls tab

Creating Chart Control

Now you can add the Chart control to a Web page by dragging and dropping the Chart control from Toolbox to the page. See Figure 3.

 
Figure 3.


If you look at HTML view, there is reference added at the top:

<%@ Register Assembly="dotnetCHARTING" Namespace="dotnetCHARTING" TagPrefix="dotnetCHARTING" %>

And the following code is added for the chart.

<dotnetCHARTING:Chart ID="Chart1" runat="server">
<TitleBox Position="Left">
<Label Color="Black"></Label>
</TitleBox>

<DefaultLegendBox CornerBottomRight="Cut" Padding="4">
<HeaderEntry Visible="False"></HeaderEntry>
</DefaultLegendBox>
</dotnetCHARTING:Chart>

So if you do not want to use the designer (who wouldn’t, but in case you do not have Visual Studio), you can simply type the above code in HTML.  For those used to traditional asp you can open one of the hundreds of included .aspx samples and directly modify it.  Such samples show usage using the familiar property and method syntax rather than the declarative control syntax created by the .netCHARTING design-time control.  Whichever method of development you are most comfortable with you can use with .netCHARTING.

Setting Chart Properties 

Like any other control, you may set Chart’s properties using Properties dialog. The Properties dialog for Chart control looks like Figure 4.

 

Figure 4. Chart properties

If you expand ChartArea, you will see more properties related to Chart area only. See Figure 5.

 

Figure 5.

 

Figure 6.

As you can see from Figure 6, the chart formatting is changed according to the properties.

What’s so cool in .netCHARTING?

Now let’s look at some unique charts and reports using some advanced features. Out of a couple of dozen new features added to version 4.0, here is a list of the features I was most interested in:
1. ImageBars™
2. Bubble charts
3. Radar charts
4. Map charts
5. XAML Support

1. ImageBars™
ImageBars™ feature allows you to use an image to create bar charts.

 

You may also combine multiple images in a chart to separate different bars. Here is a crazy but fabulous looking image bars chart showing some of the provided ImageBars™.

 


2. Bubble shading charts

3. Radar charts

4. Map Support including Map zooming and custom map styling

5. XAML Support. 
.netCHARTING has a high level of support for native vector formats including the usual SWF (flash) and SVG but more unique is the native PDF Support (actual native vector PDF support, not a bitmap in a PDF container) and the new XAML support of value to those developers already working with .NET 3.0.

These are just a few examples of some cool features available in .netCHARTING. There are over 350 samples available in both C# and Visual Basic .NET.

Get Expertise in .netCHARTING and Make $$$

Here is something great for .netCHARTING experts. .netCHARTING is offering a certification, which may lead you to make money by providing consulting services to end users of .netCHARTING. Check out the following page for more details: 
http://www.dotnetcharting.com/dncpoverview.aspx

The Verdict

The software market is flooded with charting controls and it is very difficult to figure out which charting control to buy. If you are in a need of one, give .netCHARTING a shot and I am very confident, it will not disappoint you. You can download a free trial version http://www.dotnetcharting.com/