Commit f6a0fc6c authored by Paul Asmuth's avatar Paul Asmuth
Browse files

ui: implemented data-y-max for timeseries widget

parent d5664c2b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -139,6 +139,12 @@ These are the valid html attributes:
    height of the chart (default is 240px)
    </td>
  </tr>
  <tr>
    <th>data-y-max</th>
    <td>
    highest value on the y axis (default is none)
    </td>
  </tr>
  <tr>
    <th>data-chart-style</th>
    <td>
+7 −0
Original line number Diff line number Diff line
@@ -47,6 +47,13 @@ FnordMetric.widgets.timeseries = function(elem){
      stroke: true
    };


    if (elem.attr('data-y-max')) {
      gconfig.max = parseFloat(elem.attr('data-y-max'));
    } else {
      delete gconfig.max;
    }

    if (elem.attr('data-cardinal') == "on") {
      gconfig.interpolation = 'cardinal';
    } else {