WebRoot/FusionChartsFree/Contents/HowFCWorksDURL.html
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FusionCharts Free Documentation</title>
<link rel="stylesheet" href="Style.css" type="text/css" />
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td><h2 class="pageHeader">dataURL Method </h2></td>
</tr>
<tr>
<td valign="top" class="text"><p>In this method, you provide the URL of XML Data Document to FusionCharts. The chart now sends a request for XML data to the specified URL, reads it, parses it and then renders the charts accordingly. The following diagram would help you understand better:</p>
</td>
</tr>
<tr>
<td valign="top" class="text"><img src="Images/dataURLMethod.jpg" class="imageBorder"/></td>
</tr>
<tr>
<td valign="top" class="text"><p>As you can see above, the following steps are involved in this process:</p>
<ol>
<li>You first send the HTML content and SWF file to the end viewer's browser. Along with the SWF, you also tell where the data is to be pulled from. This URL points to your server side scripts which would output the XML data document for the chart.<br/><br/>
Once the SWF is loaded on the end viewer's machine, it sends a request for XML data document to the specified URL.<br />
<br />
</li>
<li>Your server side scripts at this URL now
<ul>
<li>Take in the passed parameters (if any) </li>
<li>Process them </li>
<li>Interact with the database. [ Server side scripts also can use forms or arrays as data source. ]</li>
<li>Get data from data base in native objects like Recordsets, Data Readers etc. </li>
<li>Convert this data into XML format using simple string concatenations or using XML DOM.</li>
<li>Finally write this data to output stream (NOT physically on server). </li>
</ul>
<br />
<li>FusionCharts now accepts this XML data, parses it and finally renders the chart. </li>
</ol>
<p class="highlightBlock">If your <span class="codeInline">dataURL</span> contains special characters like ?, & etc., you need to URL Encode the entire URL. Also, if you want to pass any parameters as part of <span class="codeInline">dataURL</span> to your server side scripts, you'll need to URL Encode the entire <span class="codeInline">dataURL</span>. Example: if you want to provide data URL as <span class="codeInline">Data.asp?id=1&subId=2</span>, it should be provided as <span class="codeInline">Data%2Easp%3Fid%3D1%26subId%3D2</span>.</p> </td>
</tr>
<tr>
<td valign="top" class="text"> </td>
</tr>
<tr>
<td valign="top" class="text"><p>As explained earlier, you need the following elements to build a chart using dataURL method:</p>
<ol>
<li><strong>Chart Container Page </strong>- The page which contains the HTML code to embed and show the chart. This page contains the URL for XML Data Document also.</li>
<li><strong>Chart SWF File</strong></li>
<li><strong>Data Provider Page </strong>- The page which will provide XML Data to FusionCharts. This page outputs ONLY XML and no HTML tags. </li>
</ol></td>
</tr>
<tr> <td valign="top" class="text"> </td> </tr>
<tr>
<td valign="top" class="header">Sample Usage of dataURL method using FusionCharts JavaScript Class receiving data from a pre-built XML document </td>
</tr>
<tr>
<td valign="top" class="codeBlock"><div id="chart1div"><br />
This text is replaced by the chart.<br />
</div><br />
后面还有 81 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。