當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FusionCharts::defineStyle方法代碼示例

本文整理匯總了PHP中FusionCharts::defineStyle方法的典型用法代碼示例。如果您正苦於以下問題:PHP FusionCharts::defineStyle方法的具體用法?PHP FusionCharts::defineStyle怎麽用?PHP FusionCharts::defineStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FusionCharts的用法示例。


在下文中一共展示了FusionCharts::defineStyle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

$FC->setSWFPath("../../FusionCharts/");
# Set Chart attributes
$FC->setChartParams("caption=Monthly Sales Summary;subcaption=For the year 2008;");
$FC->setChartParams("xAxisName=Month;yAxisName=Sales;numberPrefix=\$;showNames=1;");
$FC->setChartParams("showValues=0;showColumnShadow=1;animation=1;");
$FC->setChartParams("baseFontColor=666666;lineColor=FF5904;lineAlpha=85;");
$FC->setChartParams("valuePadding=10;labelDisplay=rotate;useRoundEdges=1");
#add chart data values and category names
$FC->addChartData("17400", "Label=januári");
$FC->addChartData("19800", "Label=Fevruários");
$FC->addChartData("21800", "Label=مارس");
$FC->addChartData("23800", "Label=أبريل");
$FC->addChartData("29600", "Label=五月");
$FC->addChartData("27600", "Label=六月");
$FC->addChartData("31800", "Label=תִּשׁרִי");
$FC->addChartData("39700", "Label=Marešwān");
$FC->addChartData("37800", "Label=settèmbre");
$FC->addChartData("21900", "Label=ottàgono");
$FC->addChartData("32900", "Label=novèmbre");
$FC->addChartData("39800", "Label=décembre");
# apply style
$FC->defineStyle("myCaptionFont", "Font", "size=12");
$FC->applyStyle("DATALABELS", "myCaptionFont");
# Render  Chart
$FC->renderChart();
?>
<BR><BR>
<a href='../NoChart.html' target="_blank">Unable to see the chart above?</a>
</CENTER>
</BODY>
</HTML>
開發者ID:bamcod,項目名稱:Disease-Surveillance,代碼行數:31,代碼來源:dataXML.php

示例2: FusionCharts

include "../Class/FusionCharts_Gen.php";
# Create Column3D chart Object
$FC = new FusionCharts("column3D", "300", "250");
# set the relative path of the swf file
$FC->setSWFPath("../FusionCharts/");
# Define chart attributes
$strParam = "caption=Weekly Sales;xAxisName=Week;yAxisName=Revenue;numberPrefix=\$";
# Set chart attributes
$FC->setChartParams($strParam);
# Add chart values and category names
$FC->addChartData("40800", "label=Week 1");
$FC->addChartData("31400", "label=Week 2");
$FC->addChartData("26700", "label=Week 3");
$FC->addChartData("54400", "label=Week 4");
# Define First Style element
$FC->defineStyle("MyFirstFontStyle", "font", "font=Verdana;size=12;color=FF0000; bgColor=FFFFDD;borderColor=666666");
# Define Second Style element
$FC->defineStyle("MyFirstGlow", "Glow", "color=FF5904;alpha=75");
# Apply Style
$FC->applyStyle("CAPTION", "MyFirstFontStyle");
# Apply Style
$FC->applyStyle("XAXISNAME", "MyFirstGlow,MyFirstFontStyle");
# Apply Style
$FC->applyStyle("YAXISNAME", "MyFirstGlow");
?>
<html>
  <head>
    <title>First Chart - Advanced - Set Style : Using FusionCharts PHP Class</title>
    <script language='javascript' src='../FusionCharts/FusionCharts.js'></script>
  </head>
  <body>
開發者ID:bamcod,項目名稱:Disease-Surveillance,代碼行數:31,代碼來源:FirstChart_Style.php


注:本文中的FusionCharts::defineStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。