Commit 8112edc7 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

timeseries gauge: fixed xticks option

parent efbce9ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ class FnordMetric::TimeseriesWidget < FnordMetric::Widget
      :gauges => gauges.map(&:name),
      :start_timestamp => ticks.first,
      :end_timestamp => ticks.last,
      :xticks => (@opts[:xticks] || 30),
      :autoupdate => (@opts[:autoupdate] || 60),
      :include_current => !!@opts[:include_current],
      :default_style => (@opts[:plot_style] || 'line'),
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ FnordMetric.widgets.timeseriesWidget = function(){

    /*
      options:
        
        height: 430
        default_cardinal: true/false
        default_style: line/area/stack/flow
@@ -21,6 +20,7 @@ FnordMetric.widgets.timeseriesWidget = function(){
      if(opts.default_style == "areaspline"){ opts.default_style = 'area'; }
      if(!opts.default_style){ opts.default_style = 'line'; }
      if(!opts.default_cardinal){ opts.default_cardinal = true; }
      if(opts.xticks){ xticks = opts.xticks; }

      draw_layout();

@@ -364,6 +364,7 @@ FnordMetric.widgets.timeseriesWidget = function(){

      if(!opts.start_timestamp || !opts.end_timestamp || !!force){
        opts.end_timestamp = _now + opts.tick;
        console.log(xticks);
        opts.start_timestamp = opts.end_timestamp - (opts.tick * xticks);
      }
    }
+1 −1

File changed.

Contains only whitespace changes.