Commit 17e5dc18 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

fnord

parent fb02aa76
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -98,13 +98,8 @@ fnordquery.widgets.timeseries_widget = function(){
        gconfig.offset = 'value';
      }

      if($(this).attr('data') == 'area'){
        gconfig.renderer = 'area';
        gconfig.offset = 'value';
      }

      if($(this).attr('data') == 'stack'){
        gconfig.renderer = 'stack';
        gconfig.renderer = 'area';
        gconfig.offset = 'value';
      }

@@ -139,13 +134,6 @@ fnordquery.widgets.timeseries_widget = function(){
                  .attr('data', 'stack')
                  .click(change_style)
              )
              .append(
                $('<div></div>')
                  .addClass('button')
                  .append($('<span>').html('Area'))
                  .attr('data', 'area')
                  .click(change_style)
              )
              .append(
                $('<div></div>')
                  .addClass('button')
+28 −24
Original line number Diff line number Diff line
@@ -31,30 +31,34 @@
  fnordquery.widgets.timeseries_widget().render({
    title: "Fnord!!!!",
    elem: $('.mywidget'),
    default_style: 'flow',
    series:[
      {
    default_style: 'stack',
    series:[{
      color: '#CD645A',
      name: "Fnord",
        data: [ 
          { x: 1336873946, y: 40 }, 
          { x: 1336874946, y: 49 }, 
          { x: 1336875946, y: 38 }, 
          { x: 1336876946, y: 30 }, 
          { x: 1336877946, y: 32 } ]
      },
      {
      data: sampler()
    },{
      color: '#2F635E',
      name: "fnord",
      data: sampler()
    },{
      color: '#42436B',
      name: "fnord",
        data: [ 
          { x: 1336873946, y: 23 }, 
          { x: 1336874946, y: 54 }, 
          { x: 1336875946, y: 36 }, 
          { x: 1336876946, y: 43 }, 
          { x: 1336877946, y: 19 } ]
      data: sampler()
    },{
      color: '#FACE4F',
      name: "fnord",
      data: sampler()
    }]
  });

  function sampler(){
    var arr=[];
    var start = 1336873946;
    for(var n=0; n < 150; n++){
      arr.push({ x: (start + n), y: (23 + (Math.random()*5)) })
    }
    return arr;
  }
    ]
  })
</script>

</body>
 No newline at end of file