Open Flash Chart. NET
Open Flash Chart. NET (OFC. NET) is based on Open Flash Chart project, web site in http://teethgrinder.co.uk/open-flash-chart (or SourceForge). You can also get source code through SVN: http://svn.k2colocation.com/svn/OpenFlashChart.
Installation Steps:
1. First, create a file in the root directory of the application (. net project ).Aspnet_clientFolder.
2,In the aspnet_clientCreate a folder under the folderOpenFlashChArt.
3.OpenFlashChartCreate a folder under the folderJsAnd add file oPen-flash-chart.swf
4. Add files to the js folderSwfobject. js
5,Add reference to OpenFlashChart. dll
6. Add Defaul. aspx and Data. aspx pages.
The folder structure of the project is as follows:
To call OFC. NET on the page, you must first register the Assembly and add the following statement at the top of the Default. aspx page:
<%@Register TagPrefix="ofc" Namespace="OpenFlashChart" Assembly="OpenFlashChart" %>
Then add the control to the page. The Code is as follows:
<ofc:Chart ID="Chart" Height="500" Width="800" Url="data.aspx" runat="server" />
Data. aspx. csThe file code is as follows:
Using System; using System. collections. generic; using System. web; using System. web. UI; using System. web. UI. webControls; using OpenFlashChart; using System. collections; namespace OpenFlashChartDemo {public partial class data: System. web. UI. page {protected void Page_Load (object sender, EventArgs e) {Graph graph = new Graph (); graph. legendX = new LegendX ("group statistics by category", 12, "# FF0000"); graph. labelsX. add ("moss"); graph. labelsX. add ("fern"); graph. labelsX. add ("Naked plants"); graph. labelsX. add ("quilt"); graph. stepsY = 5; graph. maxY = 50; OpenFlashChart. charts. chartData temp; // Bar (alpha (transparency), color (Hex), Label, Line Size) temp = new OpenFlashChart. charts. bar (75, "# FF0000", "Sales", 2); temp. data. add (20); temp. data. add (30); temp. data. add (40); temp. data. add (10); graph. data. add (temp); Response. clear (); Response. write (graph. toString (); Response. end ();}}}
You can download the entire program and the example package openflash.rar (369.61 kb) here)