private function down($stationid, $sdate, $edate) { $nt = new Psys_StationModel(); $data = $nt->UserDown($stationid, $sdate, $edate); $nts = new Psys_ResourceModel(); $datas[0]['name'] = 'android'; foreach ($data['android'] as $v) { $x_date = $x_cat[] = substr(str_replace('_', '/', $v['date']), 5); $eventrecordinfo = $nts->EventRecordInfo($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['down']; } else { $datas[0]['data'][] = array('y' => (int) $v['down'], 'marker' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000', 'states' => array('hover' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000')))); //设置当前点鼠标经过的颜色 } } $datas[1]['name'] = 'ios'; foreach ($data['ios'] as $v1) { $x_date = substr(str_replace('_', '/', $v1['date']), 5); $eventrecordinfo = $nts->EventRecordInfo($v1['date'], 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['down']; } else { $datas[1]['data'][] = array('y' => (int) $v1['down'], 'marker' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000', 'states' => array('hover' => array('fillColor' => '#FF0000', 'lineColor' => '#FF0000')))); //设置当前点鼠标经过的颜色 } } $datas[2]['name'] = 'total'; foreach ($data['total'] as $v2) { $x_date = substr(str_replace('_', '/', $v2['date']), 5); $eventrecordinfo = $nts->EventRecordInfo($v2['date'], 0, $stationid); //返回特殊点的提示信息 if (!empty($eventrecordinfo)) { $title = $eventrecordinfo['title']; $descript = $eventrecordinfo['descript']; } else { $title = ''; $descript = ''; } $datas[2]['infos']['date' . $x_date]['title'] = $title; $datas[2]['infos']['date' . $x_date]['descript'] = $descript; if (empty($eventrecordinfo)) { $datas[2]['data'][] = (int) $v2['down']; } else { $datas[2]['data'][] = array('y' => (int) $v2['down'], '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; }