Module: Effective::EffectiveDatatable::Dsl::Charts
- Included in:
- Datatable
- Defined in:
- app/models/effective/effective_datatable/dsl/charts.rb
Instance Method Summary collapse
-
#chart(name, type, options = {}, &block) ⇒ Object
Instance Methods inside the charts do ..
Instance Method Details
#chart(name, type, options = {}, &block) ⇒ Object
Instance Methods inside the charts do .. end block
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/models/effective/effective_datatable/dsl/charts.rb', line 6 def chart(name, type, = {}, &block) [:title] ||= ([:label] || name.to_s.titleize) [:legend] = 'none' if [:legend] == false (@charts ||= HashWithIndifferentAccess.new)[name] = { name: name, type: type, partial: .delete(:partial), options: , block: (block if block_given?) } end |