">返回表盘</a></div> </div> <hr> <div class="row"> <div class="col-sm-1"></div> <div class="col-sm-10"><div class="row"> <?php #linechart echo "<div class='col-sm-6'>"; $line_chart = new LineChart(); $line_panel = new Panel(); $line_chart->demo(); $line_panel->data["content"] = "<div class='ichart' id='chart1'></div>"; $line_panel->addOptionCreate(); $line_panel->show(); echo '<script>' . '$("#chart1").highcharts(' . $line_chart->getChartJson() . ');' . '</script>'; echo "</div>"; #ColumnChart echo "<div class='col-sm-6'>"; $column_chart = new ColumnChart(); $column_panel = new Panel(); $column_chart->demo(); $column_panel->data["content"] = "<div class='ichart' id='chart2'></div>"; $column_panel->addOptionCreate(); $column_panel->show(); echo '<script>' . '$("#chart2").highcharts(' . $column_chart->getChartJson() . ');' . '</script>'; echo "</div>"; #SpiderwebChart echo "<div class='col-sm-6'>"; $spiderweb_chart = new SpiderwebChart(); $spiderweb_panel = new Panel();
$d = array(); for ($i = 0; $i < $w; $i++) { if (!isset($seires[$key][$i . ""])) { $seires[$key][$i . ""] = 0; } $d[$i] = (int) $seires[$key][$i . ""]; } //补齐未过日期的值(null 是无线) // for($i=$w;$i<7;$i++){ // if(!isset($seires[$key][$i.""])) { // $seires[$key][$i.""]=null; // } // $d[$i]=$seires[$key][$i.""]; // } array_push($data, array("name" => $key, "data" => $d)); } //设置图表参数 $chart_lw = new LineChart(); $chart_lw->data["chart"]["type"] = "line"; $chart_lw->data["title"] = array("text" => "缺陷发展趋势"); $chart_lw->data["subtitle"] = array("text" => "本周缺陷发展趋势"); $chart_lw->data["xAxis"] = array("title" => array("text" => "(单位:当前周)"), "categories" => array("星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日")); $chart_lw->data["yAxis"] = array("title" => array("text" => "新增缺陷数(个)")); $chart_lw->data["series"] = $data; echo $chart_lw->getChartJson(); } } } } } }