Module: Trackplot::ChartHelper
- Defined in:
- app/helpers/trackplot/chart_helper.rb
Instance Method Summary collapse
- #trackplot_chart(data, **options, &block) ⇒ Object
- #trackplot_sparkline(data, key:, **options) ⇒ Object
Instance Method Details
#trackplot_chart(data, **options, &block) ⇒ Object
3 4 5 6 7 |
# File 'app/helpers/trackplot/chart_helper.rb', line 3 def trackplot_chart(data, **, &block) builder = ChartBuilder.new(data, **) capture(builder, &block) if block_given? builder.render(self) end |
#trackplot_sparkline(data, key:, **options) ⇒ Object
9 10 11 12 |
# File 'app/helpers/trackplot/chart_helper.rb', line 9 def trackplot_sparkline(data, key:, **) builder = SparklineBuilder.new(data, key: key, **) builder.render(self) end |