title: Extended encoding function in Powershell for Google Charts
body: <p>I have a function for simple encoding working fine in Powershell.  However, I require a function for extended encoding because I'll be plotting more than 62 points.  The Javascript function for extended encoding provided by google is <a href="http://code.google.com/apis/chart/docs/data_formats.html#encoding_data" rel="nofollow">here</a></p>
  
  <p>Example of simple encoding function:</p>
  
  <pre><code>function simpleEncoding ($valueArray) {
  $simpleEncoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
  
  $total = 0
  foreach ($value in $valueArray) {
      $total = $total + $value
  }
  for ($i = 0;$i -lt $valueArray.length;$i++) {
  
      $relativeValue = ($valueArray[$i] / $total)*62
      $relativeValue = [math]::round($relativeValue)
  
      $encodingValue = $simpleEncoding[$relativeValue]
  
      $Data = $Data + "" + $encodingValue
  
      }    
    return $data
  }
  </code></pre>
  
  <p>So I'm looking for assistance in adapting the Javascript extended encoding function into Powershell.</p>