code: def integral(requestContext, seriesList):
      
      results = []
      for series in seriesList:
          newValues = []
          current = 0.0
          for val in series:
              if val is None:
                  newValues.append(None)
              else:
                  current += val
                  newValues.append(current)
          newName = "integral(%s)" % series.name
          newSeries = TimeSeries(newName, series.start, series.end, series.step,
                                 newValues)
          newSeries.pathExpression = newName
          results.append(newSeries)
      return results
docs: This will show the sum over time, sort of like a continuous addition
      function. Useful for finding totals or trends in metrics that are
      collected per minute.
  
      Example::
  
          &target=integral(company.sales.perMinute)
  
      This would start at zero on the left side of the graph, adding the sales
      each minute, and show the total sales for the time period selected at the
      right side, (time now, or the time specified by '&until=').