Current File : /home/caballoscriollos/www/espanol/encuesta/graphs/contents/howfcworksdxml.html
<?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" />
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td><h2 class="pageHeader">dataXML Method </h2></td>
</tr>
<tr>
<td valign="top" class="text"><p>In this method, you send the XML data along with the HTML Content and chart SWF file to the browser. The SWF loads, reads this data (present in same page) and then renders the chart. The following diagram would help you understand better:</p>
</td>
</tr>
<tr>
<td valign="top" class="text"><p><img src="Images/dataXMLMethod.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 send the HTML content, chart SWF file and XML data, all at once, to the end viewer's browser. </li>
<li>Once the SWF is loaded on the end viewer's machine, it reads the XML data present on the same page</li>
<li>It finally parses it and then renders the chart.</li>
</ol>
<p class="highlightBlock">If your XML Data Document contains special characters like - ?, & etc. in <span class="codeInline">dataXML</span> mode, you'll need to XML/URL Encode them. </p></td>
</tr>
<tr>
<td valign="top" class="text"> </td>
</tr>
<tr>
<td valign="top" class="text"><p>Effectively, in this process you need the following to build a chart:</p>
<ol>
<li><strong>Chart Container Page </strong>- The page which contains the HTML code to embed and show the chart. It also contains the XML data to be used by the chart. </li>
<li><strong>Chart SWF File</strong></li>
</ol></td>
</tr>
<tr> <td valign="top" class="text"> </td> </tr>
<tr>
<td valign="top" class="header">Sample Usage of dataXML method using FusionCharts JavaScript Class </td>
</tr>
<tr>
<td valign="top" class="codeBlock"><div id="chart1div"><br />
This text is replaced by the chart.<br />
</div><br />
<script type="text/javascript"><br />
var chart1 = new FusionCharts("Column2D.swf", "ChId1", "600", "400", "0", "0");
<strong><br />
chart1.setDataXML("<chart><set name='Data1' value='1' /></chart>");</strong><br />
chart1.render("chart1div");<br />
</script></td>
</tr>
<tr> <td valign="top" class="text"> </td> </tr>
<tr>
<td valign="top" class="header">Sample Usage of dataXML method using direct HTML Embedding Method </td>
</tr>
<tr>
<td valign="top" class="codeBlock"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="500" height="300" id="Column2D" align="middle">
<br />
<param name="movie" value="Column2D.swf?chartWidth=500&chartHeight=300" /><br />
<strong> <param name="FlashVars" value="&dataXML=<chart><set name='Data1' value='1' /></chart>" /></strong><br />
<param name="quality" value="high" /><br />
<embed src="Column2D.swf?chartWidth=500&chartHeight=300" <strong>FlashVars="&dataXML=<chart><set name='Data1' value='1' /></chart>"</strong> quality="high" bgcolor="#ffffff" width="400" height="300" name="Column2D" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
</object></td>
</tr>
<tr>
<td valign="top" class="text"> </td>
</tr>
<tr>
<td valign="top" class="highlightBlock"><p><span class="text">With this method, however, there can sometimes be problems when you're working with larger chunks of data. This problem occurs due to the limitation on dataXML string length imposed by the browser. When you specify a larger chunk of data using dataXML method, the browser ignores everything after a certain length. This causes FusionCharts to hang (nothing would be displayed on-screen) as the full data has not been supplied to it. Therefore, dataURL method is recommended for larger chunks of data (basically - multi-series/combination charts).</span></p>
</td>
</tr>
</table>
</body>
</html>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat