Fix #6352 - adjust font size for graphs
authorAlan Knowles <alan@roojs.com>
Thu, 30 Jul 2020 07:34:36 +0000 (15:34 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 30 Jul 2020 07:34:36 +0000 (15:34 +0800)
g.bar.overlay.js

index feb3280..7ad21ee 100644 (file)
@@ -145,7 +145,7 @@ if (typeof(Raphael) == 'undefined') {
                     indicator_y = y + opts.legendheight - 42;
                 }
                 
-                var fontSize = barsteps > 10 ? 10 : 16;
+                var fontSize = barsteps > 10 ? 10 : 12;
                 
                 paper.rect(x + 1 + (k * barwidth) + 5 , indicator_y, barwidth - 10, 30, 5).attr({ stroke: "none", fill: colors[i%colors.length] });
                 paper.path(["M", x + 1 + (k * barwidth) + barwidth / 4 + 10, indicator_y + 30, "l", 5, 10, "l", 5, -10]).attr({ stroke: "none", fill: colors[i%colors.length] });
@@ -223,7 +223,7 @@ if (typeof(Raphael) == 'undefined') {
             
             if(i != 0) {
                 paper.text(x + (asixywidth / 2), Y + 15, label).attr({ 
-                    "font-size": (barsteps > 10) ? "14" : "20",
+                    "font-size": (barsteps > 10) ? "12" : "14",
                     "font-family": "'Fontin Sans', Fontin-Sans, sans-serif",
                     "font-weight": "bold",
                     "text-anchor": "end",
@@ -261,7 +261,7 @@ if (typeof(Raphael) == 'undefined') {
     
         labels.forEach(function(v,k)  {
             paper.text(x + (k * barwidth) + offset, y + (eheight / 2), v).attr({ 
-                "font-size": (steps > 10) ? "16" : "20",
+                "font-size": (steps > 10) ? "12" : "14",
                 "font-family": "'Fontin Sans', Fontin-Sans, sans-serif",
                 "font-weight": "bold",
                 fill : color