{@ $oNmsModel = &getModel("nms"); // Dataset definition $DataSet = new pData; $i = 0; } {@ // MIB의 ID를 선언 $mmid = $oMib->get('mmid'); /* 해당 모듈에 등록된 MIB 정보를 선언 (하루 기준) 5minutely : 5분 평균 값 hourly : 1시간 평균 값 (한달 기준) daily : 1일 평균 값 weekly : 1주 평균 값 (년 기준) monthly : 월 평균 값 yearly : 년 평균 값(특정 년도를 선언하면 그 해 부터 현재 년도까지를 집계) */ $output = $oMib->getNmsSnmpSummary($module_info->statistics,$mmid,$module_info->date); $oSnmp = ""; } {@ $oSnmp[] = $val->value; } {@ $oSnmpDate[] = zdate($val->regdate,$module_info->dateType); } {@ $DataSet->AddPoint(array($oSnmp),$mmid); $DataSet->SetSerieName($mmid,$mmid); $i++; } {@ $DataSet->AddAllSeries(); // $DataSet->AddPoint(array($oSnmpDate),"x"); // $DataSet->SetAbsciseLabelSerie("x"); // Initialise the graph $Test = new pChart(1000,330); $Test->setFontProperties("modules/nms/tpl/chart/pChart/Fonts/tahoma.ttf",8); $Test->setGraphArea(50,30,985,200); $Test->drawFilledRoundedRectangle(7,7,993,323,5,240,240,240); $Test->drawRoundedRectangle(5,5,995,325,5,230,230,230); $Test->drawGraphArea(255,255,255,TRUE); $Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,90,2); $Test->drawGrid(4,TRUE,230,230,230,50); // Draw the 0 line $Test->setFontProperties("modules/nms/tpl/chart/pChart/Fonts/tahoma.ttf",6); $Test->drawTreshold(0,143,55,72,TRUE,TRUE); // Draw the cubic curve graph $Test->drawFilledCubicCurve($DataSet->GetData(),$DataSet->GetDataDescription(),.1,50); // Finish the graph $Test->setFontProperties("modules/nms/tpl/chart/pChart/Fonts/tahoma.ttf",8); $Test->drawLegend(870,20,$DataSet->GetDataDescription(),255,255,255); $Test->setFontProperties("Fonts/tahoma.ttf",10); $Test->drawTitle(50,22,"Example 7",50,50,50,965); $Test->Render("modules/nms/tpl/chart/pChart/example7.png"); }