⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 php-swf charts tutorial chart_attributes.htm

📁 flash图形分析代码,可用于常见的web 文件图片的统计分析
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0075)http://www.maani.us/charts/index.php?menu=Tutorial&submenu=Chart_Attributes -->
<HTML><HEAD><TITLE>PHP/SWF Charts > Tutorial > Chart_Attributes</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META 
content="chart charts php swf php/swf xml xml/swf tool shockwave flash web graph graphs dynamic data Line column 3D Pie Stacked bar area Candlestick Scatter Mixed Jarir Maani charting plot" 
name=Keywords>
<META 
content="A simple, yet powerful PHP tool to create attractive web charts from dynamic data." 
name=description><LINK 
href="PHP-SWF Charts  Tutorial  Chart_Attributes.files/style.css" type=text/css 
rel=stylesheet><LINK href="favicon.ico" type=image/x-icon rel=icon><LINK 
href="favicon.ico" type=image/x-icon rel="shortcut icon">
<SCRIPT src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/urchin.js" 
type=text/javascript>
</SCRIPT>

<SCRIPT type=text/javascript>
_uacct = "UA-160905-1";
urchinTracker();
</SCRIPT>

<META content="MSHTML 6.00.2800.1595" name=GENERATOR></HEAD>
<BODY bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0 Marginwidth="0" 
Marginheight="0"><!-- table width must be greater than ever needed to avoid menu shrinking -->
<TABLE height=600 cellSpacing=0 cellPadding=10 width="100%" align=left border=0 
frame=void>
  <TBODY>
  <TR>
    <TD class=header vAlign=center colSpan=2 height=30><!-- header start ========================================================= --><!-- <a href="/charts/index.php">PHP/SWF Charts</a> --><A 
      href="http://www.maani.us/charts/index.php"><FONT color=#aabbcc>PHP/SWF 
      Charts</FONT></A>&nbsp;&nbsp;<FONT color=#ff4400><SMALL>4.5</SMALL></FONT> 
<!--<img src="graphics/blank.gif" width=20 height=1><font color=222222>|</font><img src="graphics/blank.gif" width=20 height=1>
<a href="/slideshow/"><font color=666666>PHP/SWF Slideshow</font></a>--><IMG 
      height=1 src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" 
      width=20><FONT color=#222222>|</FONT><IMG height=1 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" width=20> 
      <A href="http://www.maani.us/xml_charts/"><FONT color=#666666>XML/SWF 
      Charts</FONT></A> <IMG height=1 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" 
      width=20><FONT color=#222222>|</FONT><IMG height=1 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" width=20> 
      <A href="http://www.maani.us/xml_slideshow/"><FONT color=#666666>XML/SWF 
      Slideshow</FONT></A> <IMG height=1 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" 
      width=20><FONT color=#222222>|</FONT><IMG height=1 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" width=20> 
      <A href="http://www.maani.us/gauge/"><FONT color=#666666>XML/SWF 
      Gauge</FONT></A> <!-- header end --></TD></TR>
  <TR>
    <TD class=menu width=150><!-- menu start ========================================================= --><!-- SiteSearch Google -->
      <FORM action=http://www.google.com/search method=get><INPUT type=hidden 
      value=UTF-8 name=ie> <INPUT type=hidden value=UTF-8 name=oe> <INPUT 
      class=form maxLength=255 size=10 name=q> <INPUT class=form type=submit value=Search name=btnG> <INPUT type=hidden 
      value=www.maani.us/charts/ name=domains> <INPUT type=hidden 
      value=www.maani.us/charts/ name=sitesearch> </FORM>
      <HR color=#888888 noShade SIZE=1>
      <B><A 
      href="http://www.maani.us/charts/index.php?menu=Introduction">Introduction</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Gallery">Gallery</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Requirements">Requirements</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Download">Download</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Installation">Installation</A></B><BR><B><FONT 
      color=#dddddd>Tutorial</FONT></B><BR><SMALL>&nbsp;</SMALL><BR><SMALL>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
      href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Basics">Basics</A></SMALL><BR><SMALL>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
      href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Data">Chart 
      Data</A></SMALL><BR><SMALL><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chart 
      Attributes</B></SMALL><BR><SMALL>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
      href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Source">Chart 
      Source</A></SMALL><BR><SMALL>&nbsp;</SMALL><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Reference">Reference</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=FAQ">FAQ</A></B><BR>
      <HR color=#888888 noShade SIZE=1>
      <B><A 
      href="http://www.maani.us/charts/index.php?menu=License">License</A></B><BR><B><A 
      href="http://www.maani.us/charts/index.php?menu=Contact_Us">Contact 
      Us</A></B><BR><IMG height=150 
      src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif"> <!-- menu end --></TD>
    <TD class=body><!-- body start ========================================================= -->
      <TABLE cellSpacing=0 cellPadding=5 width="100%" align=left border=0>
        <TBODY>
        <TR>
          <TD width=40><IMG 
            src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif" 
            width=20></TD><!-- left margin -->
          <TD vAlign=top>
            <P></P>
            <TABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
              <TBODY>
              <TR class=prev_next>
                <TD align=left>&nbsp;<A 
                  href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Data"><B>&lt; 
                  previous</B></A></TD>
                <TD align=right><A 
                  href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Source"><B>next 
                  &gt;</B></A>&nbsp;</TD></TR></TBODY></TABLE>
            <P></P>
            <P>&nbsp;</P>
            <P><IMG height=0 
            src="PHP-SWF Charts  Tutorial  Chart_Attributes.files/blank.gif"></P><!-- top margin -->
            <P><B><BIG>Chart Attributes</BIG></B></P>
            <P>&nbsp;</P>
            <P>In the chart's source, chart attributes can be modified to create 
            different charts. This is done by modifying the variable passed as 
            an argument to the SendChartData() function. Example:</P><!-- PHP -------------------------------------->
            <P></P>
            <TABLE cellPadding=10 border=0>
              <TBODY>
              <TR>
                <TD class=php><FONT size=3><PRE>&lt;?php
include "charts.php";
 
<FONT color=#888888>//change the chart to a bar chart</FONT>
$chart [ 'chart_type' ] = "bar";
 
SendChartData ( $chart );
?&gt;
</PRE></FONT></TD></TR></TBODY></TABLE>
            <P></P><!-- PHP -------------------------------------->
            <P>
            <OBJECT id=charts 
            codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 
            height=250 width=400 
            classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="charts.swf?library_path=charts_library&amp;stage_width=400&amp;stage_height=250&amp;php_source=php%2FTutorial.php%3Fchart%3Dattributes1%26time%3D0.38134500+1184727802"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#666666">
               <EMBED 
            src='charts.swf?library_path=charts_library&stage_width=400&stage_height=250&php_source=php%2FTutorial.php%3Fchart%3Dattributes1%26time%3D0.38134500+1184727802' 
            quality=high bgcolor=#666666 WIDTH=400 HEIGHT=250 NAME='charts' 
            ALIGN='' swLiveConnect='true' TYPE='application/x-shockwave-flash' 
            PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT></P>
            <P>&nbsp;</P>
            <HR color=#888888 noShade SIZE=1>

            <P><B>Attribute Array</B></P>
            <P>The above <B>$chart&nbsp;[&nbsp;'chart_type'&nbsp;]</B> sets a 
            single string value. However, most chart attributes are arrays 
            holding several keys and values like this:</P><!-- PHP -------------------------------------->
            <P></P>
            <TABLE cellPadding=10 border=0>
              <TBODY>
              <TR>
                <TD class=php><FONT size=3><PRE>&lt;?php
include "charts.php";
 
<FONT color=#888888>&lt;!-- make the chart's border 4 pixels thick, except for the top --&gt;</FONT>
$chart [ 'chart_border' ] = array ( 'top_thickness'=&gt;0, 'bottom_thickness'=&gt;4, 'left_thickness'=&gt;4, 'right_thickness'=&gt;4 );
 
SendChartData ( $chart );
?&gt;
</PRE></FONT></TD></TR></TBODY></TABLE>
            <P></P><!-- PHP -------------------------------------->
            <OBJECT id=charts 
            codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 
            height=250 width=400 
            classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="charts.swf?library_path=charts_library&amp;stage_width=400&amp;stage_height=250&amp;php_source=php%2FTutorial.php%3Fchart%3Dattributes2%26time%3D0.38156400+1184727802"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#666666">
               <EMBED 
            src='charts.swf?library_path=charts_library&stage_width=400&stage_height=250&php_source=php%2FTutorial.php%3Fchart%3Dattributes2%26time%3D0.38156400+1184727802' 
            quality=high bgcolor=#666666 WIDTH=400 HEIGHT=250 NAME='charts' 
            ALIGN='' swLiveConnect='true' TYPE='application/x-shockwave-flash' 
            PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>
            <P></P>
            <P>&nbsp;</P>
            <HR color=#888888 noShade SIZE=1>

            <P><B>Setting Multiple Attributes</B></P>
            <P>To edit several chart attributes, set as many attribute variables 
            as needed before calling the SendChartData() function:</P><!-- PHP -------------------------------------->
            <P></P>
            <TABLE cellPadding=10 border=0>
              <TBODY>
              <TR>
                <TD class=php><FONT size=3><PRE>&lt;?php
include "charts.php";
 
<FONT color=#888888>//change the chart to a bar chart</FONT>
$chart [ 'chart_type' ] = "bar";
 
<FONT color=#888888>&lt;!-- make the chart's border 4 pixels thick, except for the top --&gt;</FONT>
$chart [ 'chart_border' ] = array ( 'top_thickness'=&gt;0, 'bottom_thickness'=&gt;4, 'left_thickness'=&gt;4, 'right_thickness'=&gt;4 );
 
SendChartData ( $chart );
?&gt;
</PRE></FONT></TD></TR></TBODY></TABLE>
            <P></P><!-- PHP -------------------------------------->
            <P>&nbsp;</P>
            <HR color=#888888 noShade SIZE=1>

            <P><B>Omitting Attributes</B></P>
            <P>Setting the chart attributes is optional. When omitted, the 
            default attributes are used instead:</P><!-- PHP -------------------------------------->
            <P></P>
            <TABLE cellPadding=10 border=0>
              <TBODY>
              <TR>
                <TD class=php><FONT size=3><PRE>&lt;?php
include "charts.php";
 
<FONT color=#888888>&lt;!-- make the chart's bottom border 4 pixels, and keep the other defaults --&gt;</FONT>
$chart [ 'chart_border' ] = array ( 'bottom_thickness'=&gt;4 );
 
SendChartData ( $chart );
?&gt;
</PRE></FONT></TD></TR></TBODY></TABLE>
            <P></P><!-- PHP -------------------------------------->
            <P>or:</P><!-- PHP -------------------------------------->
            <P></P>
            <TABLE cellPadding=10 border=0>
              <TBODY>
              <TR>
                <TD class=php><FONT size=3><PRE>&lt;?php
include "charts.php";
 
<FONT color=#888888>&lt;!-- make the chart's bottom border 4 pixels, and keep the other defaults --&gt;</FONT>
$chart [ 'chart_border' ][ 'bottom_thickness' ] = 4;
 
SendChartData ( $chart );
?&gt;
</PRE></FONT></TD></TR></TBODY></TABLE>
            <P></P><!-- PHP -------------------------------------->
            <P>&nbsp;</P>
            <P></P>
            <TABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
              <TBODY>
              <TR class=prev_next>
                <TD align=left>&nbsp;<A 
                  href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Data"><B>&lt; 
                  previous</B></A></TD>
                <TD align=right><A 
                  href="http://www.maani.us/charts/index.php?menu=Tutorial&amp;submenu=Chart_Source"><B>next 
                  &gt;</B></A>&nbsp;</TD></TR></TBODY></TABLE>
            <P></P></TD><!--
 google ========================================================= 
<td><img src="graphics/blank.gif" width=40></td><td valign=top bgcolor=eeeeee>

</td>
 google ========================================================= 
--></TR></TBODY></TABLE><!-- body end --></TD></TR>
  <TR>
    <TD align=middle colSpan=2 height=10><!-- footer start ========================================================= -->
      <HR color=#000000 noShade SIZE=2>
      <SMALL>Copyright ? 2003-2007, maani.us</SMALL> 
  <!-- footer end --></TD></TR></TBODY></TABLE>
<P>&nbsp;</P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -