示例#1
0
$line_column_panel->addOptionCreate();
$line_column_panel->show();
echo '<script>' . '$("#chart4").highcharts(' . $line_column_chart->getChartJson() . ');' . '</script>';
echo "</div>";
#PieChart
echo "<div class='col-sm-6'>";
$pie_chart = new PieChart();
$pie_panel = new Panel();
$pie_chart->demo();
$pie_panel->data["content"] = "<div class='ichart' id='chart5'></div>";
$pie_panel->addOptionCreate();
$pie_panel->show();
echo '<script>' . '$("#chart5").highcharts(' . $pie_chart->getChartJson() . ');' . '</script>';
echo "</div>";
#Dim2PieChart
echo "<div class='col-sm-6'>";
$dim2pie_chart = new Dim2PieChart();
$dim2pie_panel = new Panel();
$dim2pie_chart->demo();
$dim2pie_panel->data["content"] = "<div class='ichart' id='chart6'></div>";
$dim2pie_panel->addOptionCreate();
$dim2pie_panel->show();
echo '<script>' . '$("#chart6").highcharts(' . $dim2pie_chart->getChartJson() . ');' . '</script>';
echo "</div>";
?>
	</div></div>
	</div>	
</div>

</body>
</html>
示例#2
0
 } else {
     if ($_GET["action"] == "bug_status_assign") {
         //返回开放与未关闭BUG比率图表
         $db = new BugDB();
         $Dim1 = $db->selectWeekBugDistributeDim1();
         $data1 = array();
         foreach ($Dim1 as $val) {
             array_push($data1, array("name" => $val["name"], "y" => (int) $val["y"], "color" => $val["color"]));
         }
         $Dim2 = $db->selectWeekBugDistributeDim2();
         $data2 = array();
         foreach ($Dim2 as $val) {
             array_push($data2, array("name" => $val["name"], "y" => (int) $val["y"], "color" => $val["color"]));
         }
         //设置图表参数
         $chart_lw = new Dim2PieChart();
         $chart_lw->data["chart"] = array("type" => "pie");
         $chart_lw->data["title"] = array("text" => "本周发现缺陷分布");
         $chart_lw->data["subtitle"] = array("text" => "本周发现bug状态和指派人");
         $chart_lw->data["series"][0] = array("name" => "Status", "size" => "60%", "dataLabels" => array("distance" => -50, "color" => "white"));
         $chart_lw->data["series"][1] = array("name" => "Assign", "size" => "80%", "innerSize" => "60%");
         $chart_lw->data["colors"] = array("#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B", "#514F78");
         $chart_lw->data["series"][0]["data"] = $data1;
         $chart_lw->data["series"][1]["data"] = $data2;
         echo $chart_lw->getChartJson();
     } else {
         if ($_GET["action"] == "week_bug_trend") {
             //返回开放BUG图表
             $db = new BugDB();
             $week_bugs = $db->selectWeekBugTrend();
             $seires = array();