<%@ Language=VBScript %> FusionCharts Free - Form Based Data Charting Example <% 'You need to include the following JS file, if you intend to embed the chart using JavaScript. 'Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer 'When you make your own charts, make sure that the path to this JS file is correct. Else, you would get JavaScript errors. %> <% 'We've included ../Includes/FusionCharts.asp, which contains functions 'to help us easily embed the charts. %>

FusionCharts Free Form-Based Data Example

Restaurant Sales Chart below

<% 'We first request the data from the form (Default.asp) Dim intSoups, intSalads, intSandwiches, intBeverages, intDesserts intSoups = Int(Request.Form("Soups")) intSalads = Int(Request.Form("Salads")) intSandwiches = Int(Request.Form("Sandwiches")) intBeverages = Int(Request.Form("Beverages")) intDesserts = Int(Request.Form("Desserts")) 'In this example, we're directly showing this data back on chart. 'In your apps, you can do the required processing and then show the 'relevant data only. 'Now that we've the data in variables, we need to convert this into XML. 'The simplest method to convert data into XML is using string concatenation. Dim strXML 'Initialize element strXML = "" 'Add all data strXML = strXML & "" strXML = strXML & "" strXML = strXML & "" strXML = strXML & "" strXML = strXML & "" 'Close element strXML = strXML & "" 'Create the chart - Pie 3D Chart with data from strXML Call renderChart("../../FusionCharts/FCF_Pie3D.swf", "", strXML, "Sales", 600, 350) %> Enter data again

Unable to see the chart above?
« Back to list of examples