Class: Compendium::ChartProvider::AmCharts
- Inherits:
-
AbstractChartProvider
- Object
- AbstractChartProvider
- Compendium::ChartProvider::AmCharts
- Defined in:
- lib/compendium/chart_provider/amcharts.rb
Overview
Uses the amcharts.rb gem to provide charting
Instance Attribute Summary
Attributes inherited from AbstractChartProvider
Instance Method Summary collapse
-
#initialize(type, data, &setup_proc) ⇒ AmCharts
constructor
A new instance of AmCharts.
- #render(template, container) ⇒ Object
Methods inherited from AbstractChartProvider
Constructor Details
#initialize(type, data, &setup_proc) ⇒ AmCharts
5 6 7 |
# File 'lib/compendium/chart_provider/amcharts.rb', line 5 def initialize(type, data, &setup_proc) @chart = chart_class(type).new(data, &setup_proc) end |
Instance Method Details
#render(template, container) ⇒ Object
9 10 11 |
# File 'lib/compendium/chart_provider/amcharts.rb', line 9 def render(template, container) template.amchart(chart, container) end |