private function connect($stationid, $sdate, $edate) { $nt = new Psys_StationModel(); $data = $nt->UserConnect($stationid, $sdate, $edate); $nts = new Psys_ResourceModel(); $datas[0]['name'] = '连接走势'; foreach ($data as $v) { $x_date = $x_cat[] = date('m/d', strtotime($v['date'])); $eventrecordinfo = $nts->EventRecordInfo(str_replace('-', '_', $v['date']), 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['num']; } else { $datas[0]['data'][] = array('y' => (int) $v['num'], 'marker' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000', 'states' => array('hover' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000')))); //设置当前点鼠标经过的颜色 } //$y_data[] = (int)$v['num']; } $res['y_data'] = $datas; $res['x_cat'] = $x_cat; return $res; }