瀏覽代碼

Graph: fix for legends on the side and graph dimensions adaptation

Torkel Ödegaard 11 年之前
父節點
當前提交
f743288ce0
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      src/app/components/settings.js
  2. 2 0
      src/app/directives/grafanaGraph.js

+ 1 - 0
src/app/components/settings.js

@@ -17,6 +17,7 @@ function (_, crypto) {
       window_title_prefix           : 'Grafana - ',
       panels                        : {
         'graph': { path: 'panels/graph' },
+        'stats': { path: 'panels/stats' },
         'text': { path: 'panels/text' }
       },
       plugins                       : {},

+ 2 - 0
src/app/directives/grafanaGraph.js

@@ -207,6 +207,8 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
           }
 
           if (shouldDelayDraw(panel)) {
+            // temp fix for legends on the side, need to render twice to get dimensions right
+            callPlot();
             setTimeout(callPlot, 50);
             legendSideLastValue = panel.legend.rightSide;
           }