WebRoot/FusionChartsFree/Code/ASP/FormBased/Chart.asp
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE> FusionCharts Free - Form Based Data Charting Example </TITLE>
<%
'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.
%>
<SCRIPT LANGUAGE="Javascript" SRC="../../FusionCharts/FusionCharts.js"></SCRIPT>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.text{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</HEAD>
<%
'We've included ../Includes/FusionCharts.asp, which contains functions
'to help us easily embed the charts.
%>
<!-- #INCLUDE FILE="../Includes/FusionCharts.asp" -->
<BODY>
<CENTER>
<h2><a href="http://www.fusioncharts.com" target="_blank">FusionCharts Free</a> Form-Based Data Example</h2>
<h4>Restaurant Sales Chart below</h4>
<%
'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 <graph> element
strXML = "<graph caption='Sales by Product Category' subCaption='For this week' showPercentageInLabel='1' pieSliceDepth='25' decimalPrecision='0' showNames='1'>"
'Add all data
strXML = strXML & "<set name='Soups' value='" & intSoups & "' />"
strXML = strXML & "<set name='Salads' value='" & intSalads & "' />"
strXML = strXML & "<set name='Sandwiches' value='" & intSandwiches & "' />"
strXML = strXML & "<set name='Beverages' value='" & intBeverages & "' />"
strXML = strXML & "<set name='Desserts' value='" & intDesserts & "' />"
'Close <graph> element
后面还有 13 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。