 if (magnitude > suffixes.length - 1)
          magnitude = suffixes.length - 1;
        return String(round(v / Math.pow(10, magnitude * 3), 2)) +
          suffixes[magnitude];
      }

      var g = new Dygraph(document.getElementById("labelsKMB"), data, {
        labelsKMB: true,
        labels: ['Base', 'Power']
      });
      var g2 = new Dygraph(document.getElementById("labelsKMG2"), data, {
        labelsKMG2: true,
        labels: ['Base', 'Power']
      });
      var g3 = new Dygraph(document.get