Uncommited changes synced
authorAlan Knowles <alan@roojs.com>
Fri, 8 Feb 2019 04:44:13 +0000 (12:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 8 Feb 2019 04:44:13 +0000 (12:44 +0800)
g.bar.overlay.js

index fae7ede..4e1f590 100644 (file)
@@ -96,12 +96,12 @@ if (typeof(Raphael) == 'undefined') {
         //bars
         var unit = barheight / max;
         var indicator = [];
-        values.forEach((value,i) => {
+        values.forEach(function(value,i) {
             if (!Raphael.is(values[0], "array")) {
                 value = [value];
             }
     
-            value.forEach((v,k) => {
+            value.forEach(function(v,k)  {
                 paper.rect(x + 1 + (k * barwidth) , y + (max - v) * unit, barwidth - 2, v * unit).attr({ stroke: "none", fill: colors[i%colors.length] });
                 paper.rect(x + 1 + (k * barwidth) + barwidth / 4 , y + (max - v) * unit - 42, barwidth / 2, 30, 5).attr({ stroke: "none", fill: "#0C014D" });
                 indicator = indicator.concat(["M", x + 1 + (k * barwidth) + barwidth / 4 + 10, y + (max - v) * unit - 12, "l", 5, 10, "l", 5, -10]);
@@ -217,7 +217,7 @@ if (typeof(Raphael) == 'undefined') {
             text = paper.set(),
             offset = Math.round(barwidth / 2);
     
-        labels.forEach((v,k) => {
+        labels.forEach(function(v,k)  {
             paper.text(x + (k * barwidth) + offset, y + (eheight / 2), v).attr({ 
                 "font-size": "20",
                 "font-family": "'Fontin Sans', Fontin-Sans, sans-serif",