<%@LANGUAGE="VBSCRIPT"%> <% option explicit %> <% 'We've included ../Includes/FusionCharts.asp, which contains functions 'to help us easily embed the charts. %> FusionCharts XT - ASP Class Database Example using Single Series Column 3D Chart

The Pie chart below has been rendered usind ASP Class, getting data from databse.
The chart shows summarized data of three factories.
The data is generated in another ASP file using FusionCharts ASP Class.
The data is passed to the chart using Data URL Method

 

<% 'In this example, we show how to connect FusionCharts to a database 'using FusionCharts ASP class. In our other examples, we've used dataXML method 'where the XML is generated in the same page as chart. Here, the XML data 'for the chart would be generated in PieData.asp. 'For the sake of ease, we've used an MySQL databases containing two tables. 'the asp script in piedata.asp interacts with the database, 'converts the data into proper XML form and finally 'relays XML data document to the chart dim strDataURL strDataURL = "PieData.asp" 'Create the chart - Pie 3D Chart with dataURL as strDataURL Response.Write(renderChart("../../FusionCharts/Pie3D.swf", strDataURL, "", "FactorySum", 650, 450, false, false,false)) %>