diff --git a/sites/all/modules/contrib/charts_graphs/apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc b/sites/all/modules/contrib/charts_graphs/apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc
index 72fc9b7..4ca6e99 100644
--- a/sites/all/modules/contrib/charts_graphs/apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc
+++ b/sites/all/modules/contrib/charts_graphs/apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc
@@ -110,27 +110,18 @@ class ChartsGraphsGoogleCharts extends ChartsGraphsCanvas {
     $chdl = array();
     foreach ($series as $serie_name => $serie) {
       $chdl[] = $serie_name;
-      $min_serie = 0;
-      $max_serie = reset($serie);
-      $serie_as_string = '';
-      foreach ($serie as $val) {
-        $serie_as_string .= ',' . drupal_urlencode($val);
-        if ($val < $min_serie) {
-          $min_serie = $val;
-        }
-        elseif ($val > $max_serie) {
-          $max_serie = $val;
-        }
-      }
-      if ($min_serie < $min_y) {
-        $min_y = $min_serie;
+
+      $serie_as_string = implode(',',$serie);
+      
+      if (min($serie) < $min_y) {
+        $min_y = min($serie);
       }
       if ($is_stacked) {
-        $max_y += $max_serie;
+        $max_y += max($serie);
       }
       else {
-        if ($max_serie > $max_y) {
-          $max_y = $max_serie;
+        if (max($serie) > $max_y) {
+          $max_y = max($serie);
         }
       }
 
@@ -138,30 +129,15 @@ class ChartsGraphsGoogleCharts extends ChartsGraphsCanvas {
        * Applying user defined min and max y axis values.
        */
       if (isset($this->y_min)) {
-        $min_serie = $this->y_min;
         $min_y = $this->y_min;
       }
       if (isset($this->y_max)) {
-        $max_serie = $this->y_max;
         $max_y = $this->y_max;
       }
-
-      if (strlen($serie_as_string)) {
-        $serie_as_string = substr($serie_as_string, 1);
-      }
       $chd[] = $serie_as_string;
-      if (!$is_stacked) {
-        $chds .= ',' . drupal_urlencode($min_serie) . ',' . drupal_urlencode($max_serie);
-      }
-    }
-    if ($is_stacked) {
-      $chds = drupal_urlencode($min_y) . ',' . drupal_urlencode($max_y);
-    }
-    else {
-      if (strlen($chds)) {
-        $chds = substr($chds, 1);
-      }
     }
+    $chds = drupal_urlencode($min_y) . ',' . drupal_urlencode($max_y);
+
     $this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_DATA_PARAMETER] = 
       CHARTS_GRAPHS_GOOGLE_CHARTS_DATA_STARTER . implode('|', $chd);
     $this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_MIN_MAX_PER_SERIE_PARAMETER] = $chds;
