Class: Statusboard::GraphWidget

Inherits:
WidgetBase show all
Defined in:
lib/statusboard/widgets/graph.rb

Overview

Class which represents graph widgets for Status Board. The widget is configured and filled with data using a DSL whoch is passed to the constructor.

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ GraphWidget

Initializes a new graph widget instance using the configuration and data source specified in the block. The block is excepted to use the DSL.



14
15
16
# File 'lib/statusboard/widgets/graph.rb', line 14

def initialize(&block)
  @graph_description = DSL::GraphDescription.new(&block)
end

Instance Method Details

#renderObject



18
19
20
# File 'lib/statusboard/widgets/graph.rb', line 18

def render
  @graph_description.construct.to_json
end