private function PrevWeekRose($stationid, $sdate, $edate) { $nt = new Psys_StationModel(); $data = $nt->PrevWeekRose($stationid, $sdate, $edate); $nts = new Psys_ResourceModel(); $datas[0]['name'] = '上周注册流失率'; foreach ($data['regrose'] as $k => $v) { $x_date = $x_cat[] = substr(str_replace('_', '/', $k), 5); $eventrecordinfo = $nts->EventRecordInfo(str_replace('-', '_', $k), 0, $stationid); //返回特殊点的提示信息 if (!empty($eventrecordinfo)) { $title = $eventrecordinfo['title']; $descript = $eventrecordinfo['descript']; } else { $title = ''; $descript = ''; } $datas[0]['infos']['date' . $x_date]['title'] = $title; $datas[0]['infos']['date' . $x_date]['descript'] = $descript; if (empty($eventrecordinfo)) { $datas[0]['data'][] = (int) $v; } else { $datas[0]['data'][] = array('y' => (int) $v, 'marker' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000', 'states' => array('hover' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000')))); //设置当前点鼠标经过的颜色 } } $datas[1]['name'] = '上周下载流失率'; foreach ($data['downrose'] as $k1 => $v1) { $x_date = substr(str_replace('_', '/', $k1), 5); $eventrecordinfo = $nts->EventRecordInfo(str_replace('-', '_', $k1), 0, $stationid); //返回特殊点的提示信息 if (!empty($eventrecordinfo)) { $title = $eventrecordinfo['title']; $descript = $eventrecordinfo['descript']; } else { $title = ''; $descript = ''; } $datas[1]['infos']['date' . $x_date]['title'] = $title; $datas[1]['infos']['date' . $x_date]['descript'] = $descript; if (empty($eventrecordinfo)) { $datas[1]['data'][] = (int) $v1; } else { $datas[1]['data'][] = array('y' => (int) $v1, 'marker' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000', 'states' => array('hover' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000')))); //设置当前点鼠标经过的颜色 } } $res['y_data'] = $datas; $res['x_cat'] = $x_cat; return $res; }