WebRoot/FusionChartsFree/Contents/PHP_Array.html

(开头部分) 15KB

这里只显示每个文件的开头 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">Using FusionCharts with PHP &gt; Charting Data from an Array </h2></td>
  </tr>
  <tr> 
    <td valign="top" class="text"><p>In this section, we'll show you how to use FusionCharts and PHP to plot charts from data contained in PHP arrays. We'll cover the following examples here:</p>
      <ul>
        <li>Creating a single series chart from data contained in arrays</li>
        <li>Creating a multi-series chart from data contained in arrays </li>
      </ul>
      <p><strong>Before you go further with this page, we recommend you to please see the previous section &quot;Basic Examples&quot; as we start off from concepts explained in that page. </strong></p>
      <p class="highlightBlock">The code examples contained in this page are present in <span class="codeInline">Download Package &gt; Code &gt; PHP &gt; ArrayExample</span> folder. </p></td>
  </tr>
  <tr>
    <td valign="top" class="text">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" class="header">Creating a single series chart from data contained in arrays</td>
  </tr>
  <tr>
    <td valign="top" class="text">The code to create a single series chart is contained in <span class="codeInline">SingleSeries.php</span> and can be listed as under: </td>
  </tr>
  <tr>
    <td valign="top" class="codeBlock">
      <p>&lt;?php<br />
      <span class="codeComment">
      //We've included ../Includes/FusionCharts.php, which contains functions<br />
      //to help us easily embed the charts.</span><br />
      include(&quot;../Includes/FusionCharts.php&quot;);<br />
	   <span class="codeComment">//a file having a list of colors to be applied to each column (using getFCColor() function</span>)<br />
 	include(&quot;../Includes/FC_Colors.php&quot;);<br />   ?&gt;<br /><BR />
      &lt;HTML&gt;<br />
      &nbsp;&nbsp;&nbsp;&lt;HEAD&gt;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;TITLE&gt;	FusionCharts Free - Array Example using Single Series Column 3D Chart&lt;/TITLE&gt;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SCRIPT LANGUAGE=&quot;Javascript&quot; SRC=&quot;../../FusionCharts/FusionCharts.js&quot;&gt;&lt;/SCRIPT&gt;<br />
  &nbsp;&nbsp;&nbsp;&lt;/HEAD&gt;<br />
  &nbsp;&nbsp;&nbsp;&lt;BODY&gt;<br />
  &nbsp;&nbsp;&nbsp;&lt;?php<br />
      &nbsp;&nbsp;<span class="codeComment">&nbsp;//In this example, we plot a single series chart from data contained<br />
&nbsp;&nbsp;&nbsp;//in an array. The array will have two columns - first one for data label<br />
&nbsp;&nbsp;&nbsp;//and the next one for data values.<br />
&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;//Let's store the sales data for 6 products in our array). We also store<br />
&nbsp;&nbsp;&nbsp;//the name of products. </span><br />
      <span class="codeComment">&nbsp;&nbsp;&nbsp;//Store Name of Products</span><br />
      &nbsp;&nbsp;&nbsp;$arrData[0][1] = &quot;Product A&quot;;<br />
      &nbsp;&nbsp;&nbsp;$arrData[1][1] = &quot;Product B&quot;;<br />
      &nbsp;&nbsp;&nbsp;$arrData[2][1] = &quot;Product C&quot;;<br />
      &nbsp;&nbsp;&nbsp;$arrData[3][1] = &quot;Product D&quot;;<br />
      &nbsp;&nbsp;&nbsp;$arrData[4][1] = &quot;Product E&quot;;<br />
      &nbsp;&nbsp;&nbsp;$arrData[5][1] = &quot;Product F&quot;;<br />
后面还有 145 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。