Commit 6479c39b authored by Paul Asmuth's avatar Paul Asmuth
Browse files

more bars widget

parent 7feccd0e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -38,14 +38,13 @@
          %span.desc Mode
          %span.value= 0

=@histogram.histogram(@opts[:histogram])

:gaugejs

  FnordMetric.ui.resizable('.report_view');

  FnordMetric.widgets.barsWidget().render({
    title: "Fnord!!!!",
    title: "Histogram: Number of #{key_nouns.last}",
    color: "#{FnordMetric::COLORS.last}",
    elem: $('.widget_histogram_bars'),
    height: 320,
+0 −15
Original line number Diff line number Diff line
@@ -41,13 +41,6 @@ FnordMetric.widgets.barsWidget = function(){
            .addClass('headbar')
            .append($('<h2></h2>').html(opts.title))
        )
        .append(
          $('<div></div>')
            .addClass('legend')
            .css({
              margin: '10px 30px 0 30px',
            })
        )
        .append(
          $('<div></div>')
            .addClass('container')
@@ -77,7 +70,6 @@ FnordMetric.widgets.barsWidget = function(){

    function renderChart(){
      $(gconfig.element).html("");
      $(".rickshaw_legend", opts.elem).html("");

      gconfig.series = [{
        name: opts.title,
@@ -85,8 +77,6 @@ FnordMetric.widgets.barsWidget = function(){
        data: []
      }];

      console.log(values);
      
      for(var n=0; n < values.length; n++){
        gconfig.series[0].data.push({
          x: n,
@@ -97,11 +87,6 @@ FnordMetric.widgets.barsWidget = function(){

      graph = new Rickshaw.Graph(gconfig);

      legend = new Rickshaw.Graph.Legend({
        graph: graph,
        element: $('.legend', opts.elem)[0]
      });

      new Rickshaw.Graph.Axis.Y({
        graph: graph,
      }).render();