<% /* 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. */ %>

FusionCharts Free Form-Based Data Example

Restaurant Sales Chart below

<% //We first request the data from the form (Default.jsp) String strSoups="",strSalads="",strSandwiches="",strBeverages="",strDesserts=""; strSoups = request.getParameter("Soups"); strSalads = request.getParameter("Salads"); strSandwiches = request.getParameter("Sandwiches"); strBeverages = request.getParameter("Beverages"); strDesserts = request.getParameter("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. String 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 %> Enter data again

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