本文整理汇总了PHP中FusionCharts::applyStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP FusionCharts::applyStyle方法的具体用法?PHP FusionCharts::applyStyle怎么用?PHP FusionCharts::applyStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FusionCharts
的用法示例。
在下文中一共展示了FusionCharts::applyStyle方法的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>
示例2:
$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>
<?php
# Render Chart
$FC->renderChart();