Commit 39597cd4 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

js_api: data-height option

parent be2b6f97
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10,11 +10,12 @@
    <div
      data-fnordmetric="timeseries"
      data-style="area"
      data-time-range="36000"
      data-height="240"
      data-time-range="16000"
      data-autoupdate="10"
      data-gauges="user_logins,user_logins_failed"
      data-colors="#00ff00,#ff0000"
      style="width:700px; border:2px solid #ccc;"></div>
      style="width:600px; border:1px solid #ccc;"></div>

    <script src='http://localhost:8080/js/fnordmetric.ext.js' type='text/javascript'></script>

+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@ FnordMetric.js_api = (function(){
        var wstyle = elem.attr("data-style");
        if (!wstyle) { wstlye = "line"; }

        var wheight = elem.attr("data-height");
        if (!wheight) { wheight = 240; }
        wheight = parseInt(wheight, 10);

        var wupdate = elem.attr("data-autoupdate");
        if (!wupdate) { wupdate = 60; }
        wupdate = parseInt(wupdate, 10);
@@ -39,6 +43,7 @@ FnordMetric.js_api = (function(){
          async_chart: true,
          include_current: true,
          width: 100,
          height: wheight,
          ext: true,
          gauges: gauges,
          series: series,