Пример #1
0
require_once "class.bean.Datafresh.php";
require_once "class.db.Chart.php";
#返回页面
$back_page = $_GET["backpage"] . "&edit=true";
$chart_id = $_GET["chart_id"];
#从数据库读取图表数据
$db = new ChartDB();
$chart_from_db = $db->selectChart($chart_id);
#拿到数据源类和图表类
$chart_type = $chart_from_db["type"];
//$data_machine=$chart_from_db["data_machine"];
#利用工厂实例化图表对象
$chart = ChartFactory::getChart($chart_type);
#赋值到各属性
$chart->setChartArray($chart_from_db["data"]);
$help = $db->selectChartHelpMsg($chart_id);
$analysis = $db->selectChartAnalysisMsg($chart_id);
?>
<div id='boader_content'>
	<div id="first_row" class="row">
		<div class="col-sm-8"></div>
		<div class="col-sm-2">
		<!--button name="" id='preview' type='button' class='btn btn-green' >预览</button>
		<button name="" id='store' type='button' class='btn btn-green' >保存图表</button-->
		</div>
		<div class="col-sm-2">
		<a id="back" href="<?php 
echo $back_page;
?>
">返回表盘</a>
		</div>