Module: ChartCandy::Helpers

Defined in:
lib/chart-candy/helpers.rb

Defined Under Namespace

Classes: ChartCandyTagHelper

Instance Method Summary collapse

Instance Method Details

#counter_chart(id, options = {}) ⇒ Object



2
3
4
# File 'lib/chart-candy/helpers.rb', line 2

def counter_chart(id, options={})
  ChartCandyTagHelper.new(self, id, options[:from], options[:to], options[:step]).counter(options)
end

#d3_include_tagObject



6
7
8
# File 'lib/chart-candy/helpers.rb', line 6

def d3_include_tag
  ('<![if ! lt IE 9]>' + javascript_include_tag("d3") + '<![endif]>').html_safe
end

#donut_chart(id, options = {}) ⇒ Object



10
11
12
# File 'lib/chart-candy/helpers.rb', line 10

def donut_chart(id, options={})
  ChartCandyTagHelper.new(self, id, options[:from], options[:to], options[:step]).donut(options)
end

#excel_chart_button(id, options = {}) ⇒ Object



18
19
20
# File 'lib/chart-candy/helpers.rb', line 18

def excel_chart_button(id, options={})
  ChartCandyTagHelper.new(self, id, options[:from], options[:to], options[:step]).excel_chart_button(options)
end

#line_chart(id, options = {}) ⇒ Object



14
15
16
# File 'lib/chart-candy/helpers.rb', line 14

def line_chart(id, options={})
  ChartCandyTagHelper.new(self, id, options[:from], options[:to], options[:step]).line(options)
end