예제 #1
0
 public static function getScaledArray($unscaledArray, $scalar)
 {
     $scaledArray = array();
     foreach ($unscaledArray as $temp) {
         if (is_array($temp)) {
             array_push($scaledArray, gchartutil::getScaledArray($temp, $scalar));
         } else {
             array_push($scaledArray, round($temp * $scalar, 2));
         }
     }
     return $scaledArray;
 }
예제 #2
0
 protected function getDataSetString()
 {
     $fullDataSet = array_splice($this->scaledValues[0], 0, 3);
     while (count($fullDataSet) < 3) {
         array_push($fullDataSet, 0);
     }
     $scaledIntersections = gchartutil::getScaledArray($this->intersections, $this->scalar);
     foreach ($scaledIntersections as $temp) {
         array_push($fullDataSet, $temp);
     }
     $fullDataSet = array_splice($fullDataSet, 0, 7);
     while (count($fullDataSet) < 7) {
         array_push($fullDataSet, 0);
     }
     return "&chd=" . $this->dataEncodingType . ":" . $this->encodeData($fullDataSet, "", ",");
 }
예제 #3
0
 protected function scaleValues()
 {
     $this->setScalar();
     $this->scaledValues = gchartutil::getScaledArray($this->values, $this->scalar);
 }