Chart FX for .NET
A Complete Package
By Brian Noyes
If you need to present professional business, scientific, or engineering graphics on a Web site or in a Windows application, I have not encountered a simpler tool to use than Chart FX for .NET. This tool allows you to create charts and graphs of more than 50 different styles using a consistent, simple, and easy-to-use approach that literally takes only a few minutes to figure out and integrate into your applications.
The simplest and quickest way to get started is to use the Chart FX Wizard to insert a chart into a Web form or Windows form. You access the wizard simply by customizing the VS .NET Toolbox and inserting the Chart FX assembly. Then you can drag and drop the control onto your forms. You can return to the wizard at any time by right-clicking on the chart and selecting Wizard from the context menu (see Figure 1). You also can set many more properties than are available in the wizard simply by using the Properties window in the VS .NET forms designer. Then you can access the entire Chart FX object model and classes through code using your .NET language of choice.
Figure 1. The Chart FX wizard makes inserting and customizing a chart in your Web form a simple, graphically intuitive matter. You can select the type of chart based on graphic representations of the styles; pick color schemes, borders, legends, gradients, and data views; and assign titles.
You can bind the chart to data contained in text files, XML, collections, arrays, or a database using a data-binding approach similar to that used by the DataGrid, DataList, and Repeater ASP.NET controls. You also can set the data at run time programmatically using the Value property of the chart itself. Setting the chart data on the fly is simply a matter of populating the Value property for the chart, which holds the data series as a set of arrays:
Chart1.OpenData(COD.Values, 2, 50);
Chart1.OpenData(COD.XValues, 2, 50);
// Generate the sin data
for (int i = 0; i < 50; i++)
Chart1.Value[0,i] = Math.Sin(2*Math.PI*i/50.0);
Chart1.Value[1,i] = Math.Cos(2*Math.PI*i/50.0);
Chart1.XValue[0,i] = 2*Math.PI*i/50.0;
Chart1.XValue[1,i] = 2*Math.PI*i/50.0;
Chart FX for .NET also has an integrated Data Editor you can attach that lets the user interactively modify the underlying data series that populates the chart.
Chart FX for .NET provides many options for output formats. The primary means, which targets even down-level browsers, is to generate an image file containing the graphic on the server and simply push it to the client as an tag after it is rendered. For this approach, you can select from JPEG or PNG as the graphic format created. If you can limit your target client browsers to those that support Structured Vector Graphics (SVG), you can get even crisper graphics using much less download bandwidth by choosing SVG as the output format. Finally, if you can ensure your clients will have Internet Explorer and the .NET Framework installed, you can select .NET as the output format.
A Complete Package
The documentation and sample code that ship with Chart FX for .NET are outstanding. It includes a resource center that presents information in a tutorial-style format complete with graphical examples, as well as sample code snippets in both C# and VB .NET for all the major pieces of functionality you will want to tap into.
Overall, I find this product to be one of the easiest to install, use, and understand of many .NET Web and Windows control products I have examined. The ease of use combined with the number of chart types and high degree of available customization make it an excellent choice for producing charts and graphs to depict your business data on a Web site or in a Windows application.
Brian Noyes is an independent software consultant, writer, trainer, and president of Software Insight (http://www.softinsight.com). He's an MCSD with more than 12 years of programming, design, and engineering experience. Brian specializes in architecture, design, and coding of cutting-edge software systems, and he is a contributing editor for asp.netPRO and other publications. E-mail him at mailto:[email protected].
Web Site: http://www.softwarefx.com
Price: Starts at US$2,699
Tell us what you think! Please send any comments about this article to [email protected]. Please include the article title and author.