Ver código fonte

Graph: legend css tweaks

Torkel Ödegaard 11 anos atrás
pai
commit
381b9ee7ee
2 arquivos alterados com 13 adições e 9 exclusões
  1. 6 6
      src/app/panels/graph/legend.js
  2. 7 3
      src/css/less/graph.less

+ 6 - 6
src/app/panels/graph/legend.js

@@ -90,7 +90,7 @@ function (angular, app, _, kbn, $) {
             html += '<i class="icon-minus pointer" style="color:' + series.color + '"></i>';
             html += '<i class="icon-minus pointer" style="color:' + series.color + '"></i>';
             html += '</div>';
             html += '</div>';
 
 
-            html += '<div class="graph-legend-alias small">';
+            html += '<div class="graph-legend-alias">';
             html += '<a>' + series.label + '</a>';
             html += '<a>' + series.label + '</a>';
             html += '</div>';
             html += '</div>';
 
 
@@ -101,11 +101,11 @@ function (angular, app, _, kbn, $) {
             var total = series.formatValue(series.stats.total);
             var total = series.formatValue(series.stats.total);
 
 
             if (panel.legend.values) {
             if (panel.legend.values) {
-              if (panel.legend.min) { html += '<div class="graph-legend-value min small">' + min + '</div>'; }
-              if (panel.legend.max) { html += '<div class="graph-legend-value max small">' + max + '</div>'; }
-              if (panel.legend.avg) { html += '<div class="graph-legend-value avg small">' + avg + '</div>'; }
-              if (panel.legend.current) { html += '<div class="graph-legend-value current small">' + current + '</div>'; }
-              if (panel.legend.total) { html += '<div class="graph-legend-value total small">' + total + '</div>'; }
+              if (panel.legend.min) { html += '<div class="graph-legend-value min">' + min + '</div>'; }
+              if (panel.legend.max) { html += '<div class="graph-legend-value max">' + max + '</div>'; }
+              if (panel.legend.avg) { html += '<div class="graph-legend-value avg">' + avg + '</div>'; }
+              if (panel.legend.current) { html += '<div class="graph-legend-value">' + current + '</div>'; }
+              if (panel.legend.total) { html += '<div class="graph-legend-value total">' + total + '</div>'; }
             }
             }
 
 
             html += '</div>';
             html += '</div>';

+ 7 - 3
src/css/less/graph.less

@@ -18,12 +18,12 @@
   top: 1px;
   top: 1px;
 }
 }
 
 
-.graph-legend-series,
 .graph-legend-icon,
 .graph-legend-icon,
 .graph-legend-alias,
 .graph-legend-alias,
 .graph-legend-value {
 .graph-legend-value {
   float: left;
   float: left;
   white-space: nowrap;
   white-space: nowrap;
+  font-size: 85%;
   text-align: left;
   text-align: left;
   &.current:before {
   &.current:before {
     content: "Current: "
     content: "Current: "
@@ -43,6 +43,8 @@
 }
 }
 
 
 .graph-legend-series {
 .graph-legend-series {
+  float: left;
+  white-space: nowrap;
   padding-left: 10px;
   padding-left: 10px;
   padding-top: 6px;
   padding-top: 6px;
 }
 }
@@ -110,7 +112,8 @@
     text-align: right;
     text-align: right;
     padding: 5px 10px;
     padding: 5px 10px;
     font-weight: bold;
     font-weight: bold;
-    color: @blue
+    color: @blue;
+    font-size: 85%;
   }
   }
 }
 }
 
 
@@ -131,7 +134,8 @@
     display: table-cell;
     display: table-cell;
     vertical-align: top;
     vertical-align: top;
     position: relative;
     position: relative;
-    left: -4px;
+    left: 4px;
+    top: -20px;
   }
   }
 
 
   .graph-legend {
   .graph-legend {