Class: Integral::ChartRenderer::Base
- Inherits:
-
Object
- Object
- Integral::ChartRenderer::Base
- Defined in:
- lib/integral/chart_renderer/base.rb
Overview
Base class which all Charts should inherit from
Class Method Summary collapse
-
.render(dataset, options = {}) ⇒ Object
Render chart markup.
Instance Method Summary collapse
-
#initialize(dataset, options = {}) ⇒ Base
constructor
A new instance of Base.
-
#render ⇒ Object
Render chart markup.
Constructor Details
#initialize(dataset, options = {}) ⇒ Base
Returns a new instance of Base.
17 18 19 20 |
# File 'lib/integral/chart_renderer/base.rb', line 17 def initialize(dataset, = {}) @dataset = dataset @options = end |
Class Method Details
.render(dataset, options = {}) ⇒ Object
Render chart markup
10 11 12 13 |
# File 'lib/integral/chart_renderer/base.rb', line 10 def self.render(dataset, = {}) renderer = new(dataset, ) renderer.render end |
Instance Method Details
#render ⇒ Object
Render chart markup
23 24 25 26 27 28 29 |
# File 'lib/integral/chart_renderer/base.rb', line 23 def render data = process_data return respond_with_chart(data) if data_available?(data) respond_with_no_data_available end |