asp:review
ChartingControl.NET 1.6 for ASP.NET 2.0
Simple to Use, Inexpensive, and Easy to Deploy
By Steve C. Orr
There are many third-party charting controls available for.NET development. Many are big, fancy, expensive software systems offered bymajor brand name software companies. They can be difficult to deploy, ofteninvolving complex dependencies and GAC registration requirements that may bedifficult (if not impossible) to deal with when deploying to shared Webservers. Such charting packages often have steep learning curves that caninvolve a developer tinkering for many days to get moderately complex charts toappear as desired. Licensing is often nefarious, too, with headaches oftenbeing caused by such things as trying to figure out if the control used bydeveloper 1 on project A using server X can be legally used by developer 2 onproject B using server Y. And good luck getting management to sign off on thelarge price tags frequently associated with such systems.
With that in mind, I?m pleased to introduce you toChartingControl.NET, which provides a development experience exactly oppositeof the description above. It?s simple and inexpensive, has a small footprint,and couldn?t possibly be any easier to deploy.
Getting Started
The free demo download of ChartingControl.NET is quick andsimple, with the zip file weighing in at just over 6 megabytes. There is nosetup program, however, so setting things up requires a few basic manual stepsthat I?d prefer to be automated. There are two sample projects included, afairly thorough help file, and the dependency free ChartControl.dll.
After creating a new Web application and adding thecharting control to your toolbox, it can be dragged onto any Web form for areasonably rich design-time experience, as shown in Figure 1.
Figure 1: With a variety of usefulconfiguration options, ChartingControl.NET presents a smooth design-timeexperience.
The smart tag allows customization of the most common gridproperties, and of course the standard Visual Studio property window can beused if preferred to set any of the 80 editable properties available there. Alternatively,the settings dialog box shown in Figure 2 is a convenient way to configuresettings and to input static or test data.
Figure 2: The settings dialog box forChartingControl.NET is a useful way to configure a graph.
There are 39 chart types, including many variations of bargraphs, pie charts, line graphs, radar charts, and even geographic maps. Theoutput for the majority of the charts is absolutely beautiful, rivaling manycharting controls that cost several times as much. While the charts render asimages by default, simply setting the UseFlash property to true will cause mostcharts to render as flash animations, with bars and lines dropping and bouncinginto place. The animations are highly customizable through a variety ofproperty settings, although I wish there were a way to get the animations tofinish faster than is currently allowed.
Unlike some competing charting controls, individual bars,lines, and other data points can have their own labels, tooltips, and clickevents for rich interactive feedback and drilldown functionality.
Code Mode
A basic ASPX declaration for ChartingControl.NET is shownin Figure 3. While most properties can be configured in the source view shown inFigure 3 or in the design-time windows shown in Figures 1 and 2, they can alsobe set at run time with intuitive syntax such as that shown in Figure 4.
<cc1:ChartCustomControl ID="ChartCustomControl1"
runat="server"
BackColor="#DDDDDD"
EllementOpacity="230"
EllementsStartupAnimationDuration="1"
Height="379px"
Type="StackedSurface3D"
Width="471px">
<MapXML></MapXML>
<GraphTitle>Salesby Month</GraphTitle>
<DataSeries>
<cc1:DataItem str="values1" />
<cc1:DataItemstr="values2" />
<cc1:DataItemstr="values3" />
</DataSeries>
<Colors>
<cc1:ColorItemcolor="Red" />
<cc1:ColorItemcolor="0, 255, 0" />
<cc1:ColorItemcolor="Blue" />
<cc1:ColorItemcolor="Yellow" />
<cc1:ColorItemcolor="Purple" />
<cc1:ColorItemcolor="Fuchsia" />
</Colors>
<UserImage></UserImage>
</cc1:ChartCustomControl>
Figure 3: A basicASPX declaration.
'Set the chart type
Chart1.Type = ChartType.Multibars3D
'Set the Y-axis data series values
Chart1.DataSeries.Clear()
Chart1.DataSeries.Add(NewChartControl.DataItem("January"))
Chart1.DataSeries.Add(NewChartControl.DataItem("February"))
Chart1.DataSeries.Add(NewChartControl.DataItem("March"))
Chart1.Labels = "Date"
'Set the title of the chart
Chart1.GraphTitle = "Title of the chart"
'Bind the chart to a data source
Chart1.DataSource = MyDataTable
Chart1.DataBind()
Figure 4:Properties can be set at run time with intuitive syntax.
As you can see, the syntax is reasonably simple for anyonefamiliar with .NET and computerized chart creation.
All About ChartingControl.NET
ChartingControl.NET was developed in pure C# code. Itssmall footprint, lack of dependencies, and ability to be deployed outside theGAC makes it great for deploying to shared Web servers to which you may nothave complete control.
While this review covers the ASP.NET 2.0 version of thecontrol, there is also a 1.1 version, as well as Windows forms versions of thecharting control. For the paltry price of only US$250 you get a fully licensedcopy of the control that can be reused universally across any or all of yourcompany?s applications. The full source code to the control can also be purchased,although it costs about 10 times as much.
The free demo of the control is fully functional, althoughit displays a notice across the front of every generated chart that says ?Notfor production environment? (as shown in Figure 5).
Figure 5: The fully functional demoof ChartingControl.NET displays beautifully rendered charts altered only by atrial notice displayed across the front.
Well Worth the Price
The performance of ChartingControl.NET is snappy andscalable. Its intuitive design-time experience and beautiful chart output couldeasily be appealing to virtually any .NET developer. ChartingControl.NET may bea little rough around the edges, such as a few typos in the documentation andproperty names, but these minor nitpicks can be easily overlooked by budget-mindedsoftware developers.
Outside Software, Inc. has quite an impressive initialcontrol on their hands. Because this is the company?s only control, you canexpect focused support like few other companies could hope to provide. Thisincludes free lifetime support, beginning with 60 days of priority e-mailsupport (send to mailto:office@chartingcontrol.net).It also includes free access to minor version upgrades. An online forum or FAQwould be nice additions to their Web site, although the online user guides andproduct documentation are ample.
If you?re in need of a good, solid charting control thatwon?t burglarize your budget, I suggest you download the freeChartingControl.NET demo now and take it for a test drive.
Steve C. Orr is anASPInsider, MCSD, Certified ScrumMaster, Microsoft MVP in ASP.NET, and authorof the book Beginning ASP.NET 2.0 AJAX (Wrox).He?s been developing software solutions for leading companies in the Seattlearea for more than a decade. When he?s not busy designing software systems orwriting about them, he can often be found loitering at local user groups andhabitually lurking in the ASP.NET newsgroup. Find out more about him at http://SteveOrr.net or e-mail him at mailto:Steve@Orr.net.
Rating: ????
Web Site: http://www.chartingcontrol.net
Price: Startsat US$250