当前位置: 首页>>代码示例>>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;未经允许,请勿转载。