本文整理汇总了PHP中PHPExcel_Settings::getChartRendererPath方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Settings::getChartRendererPath方法的具体用法?PHP PHPExcel_Settings::getChartRendererPath怎么用?PHP PHPExcel_Settings::getChartRendererPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Settings
的用法示例。
在下文中一共展示了PHPExcel_Settings::getChartRendererPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render($outputDestination = null)
{
$libraryName = PHPExcel_Settings::getChartRendererName();
if (is_null($libraryName)) {
return false;
}
// Ensure that data series values are up-to-date before we render
$this->refresh();
$libraryPath = PHPExcel_Settings::getChartRendererPath();
$includePath = str_replace('\\', '/', get_include_path());
$rendererPath = str_replace('\\', '/', $libraryPath);
if (strpos($rendererPath, $includePath) === false) {
set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath);
}
$rendererName = 'PHPExcel_Chart_Renderer_' . $libraryName;
$renderer = new $rendererName($this);
if ($outputDestination == 'php://output') {
$outputDestination = null;
}
return $renderer->render($outputDestination);
}
示例2: array
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
* @package PHPExcel_Chart_Renderer
* @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
require_once PHPExcel_Settings::getChartRendererPath() . '/jpgraph.php';
/**
* PHPExcel_Chart_Renderer_jpgraph
*
* @category PHPExcel
* @package PHPExcel_Chart_Renderer
* @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Chart_Renderer_jpgraph
{
private static $_width = 640;
private static $_height = 480;
private static $_colourSet = array('mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1', 'darkmagenta', 'coral', 'dodgerblue3', 'eggplant', 'mediumblue', 'magenta', 'sandybrown', 'cyan', 'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen', 'goldenrod2');
private static $_markSet = array('diamond' => MARK_DIAMOND, 'square' => MARK_SQUARE, 'triangle' => MARK_UTRIANGLE, 'x' => MARK_X, 'star' => MARK_STAR, 'dot' => MARK_FILLEDCIRCLE, 'dash' => MARK_DTRIANGLE, 'circle' => MARK_CIRCLE, 'plus' => MARK_CROSS);
private $_chart = null;
private $_graph = null;
示例3: renderCombinationChart
private function renderCombinationChart($groupCount, $dimensions, $outputDestination)
{
require_once PHPExcel_Settings::getChartRendererPath() . 'jpgraph_line.php';
require_once PHPExcel_Settings::getChartRendererPath() . 'jpgraph_bar.php';
require_once PHPExcel_Settings::getChartRendererPath() . 'jpgraph_scatter.php';
require_once PHPExcel_Settings::getChartRendererPath() . 'jpgraph_regstat.php';
require_once PHPExcel_Settings::getChartRendererPath() . 'jpgraph_line.php';
$this->renderCartesianPlotArea();
for ($i = 0; $i < $groupCount; ++$i) {
$dimensions = null;
$chartType = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();
switch ($chartType) {
case 'area3DChart':
$dimensions = '3d';
// no break
// no break
case 'areaChart':
$this->renderPlotLine($i, true, true, $dimensions);
break;
case 'bar3DChart':
$dimensions = '3d';
// no break
// no break
case 'barChart':
$this->renderPlotBar($i, $dimensions);
break;
case 'line3DChart':
$dimensions = '3d';
// no break
// no break
case 'lineChart':
$this->renderPlotLine($i, false, true, $dimensions);
break;
case 'scatterChart':
$this->renderPlotScatter($i, false);
break;
case 'bubbleChart':
$this->renderPlotScatter($i, true);
break;
default:
$this->graph = null;
return false;
}
}
$this->renderLegend();
$this->graph->Stroke($outputDestination);
return true;
}