</div> </div> <div class="col-sm-4"> <?php $db = new DatacenterDB(); $total_pv = $db->selectTotalPV(); $h = new StatsTile(); $h->icon = "entypo-eye"; $h->color = "tile-red"; $h->title = "总PV"; $h->introduce = "From 2014-9-25 15:36 To now"; $h->datashow = $total_pv; $h->show(); ?> <?php $db = new DatacenterDB(); $total_uv = $db->selectTotalUV(); $h = new StatsTile(); $h->icon = "entypo-eye"; $h->color = "tile-green"; $h->title = "总UV"; $h->introduce = "From 2014-9-25 15:36 To now"; $h->datashow = $total_uv; $h->show(); ?> <?php $panel = new Panel(); $panel->data = array("title" => ""); $panel->data["content"] = "<div id='pv_distribute' style='height:100%'></div>"; $panel->show(); ?>
array_push($wd["data"], round($pvdistribute["num"] / $totalpv * 100, 2)); } $chart_series[0] = $wd; //设置图表参数 $chart_lw = new LineChart(); $chart_lw->data["chart"]["type"] = "bar"; $chart_lw->data["title"] = array("text" => "PV分布"); $chart_lw->data["subtitle"] = array("text" => "各页面pv占总数百分比"); $chart_lw->data["xAxis"] = array("title" => array("text" => ""), "categories" => $categories); $chart_lw->data["yAxis"] = array("title" => array("text" => "百分比(%)")); $chart_lw->data["tooltip"] = array("pointFormat" => "<span style='color:{series.color}'>● {series.name}</span>: <b>{point.y} %</b>"); $chart_lw->data["series"] = $chart_series; echo $chart_lw->getChartJson(); } else { if ($_GET["action"] == "pv_uv_day_trend") { $db = new DatacenterDB(); $d = $db->selectPvUvDayTrend(); $categories = array(); $pv = array(); $uv = array(); foreach ($d as $val) { array_push($categories, $val["time"]); array_push($pv, (int) $val["pv"]); array_push($uv, (int) $val["uv"]); } //设置图表参数 $chart_lw = new LineChart(); $chart_lw->data["chart"] = array("type" => "line"); $chart_lw->data["title"] = array("text" => "PV/UV每日趋势"); $chart_lw->data["subtitle"] = array("text" => ""); $chart_lw->data["xAxis"] = array("title" => array("text" => ""), "categories" => $categories);