class Spout::Models::Graphables::ChoicesVsChoices
Public Instance Methods
categories()
click to toggle source
# File lib/spout/models/graphables/choices_vs_choices.rb, line 9 def categories filtered_domain_options(@chart_variable).collect(&:display_name) end
series()
click to toggle source
# File lib/spout/models/graphables/choices_vs_choices.rb, line 17 def series filtered_domain_options(@variable).collect do |option| filtered_subjects = @subjects.select{ |s| s.send(@variable.id) == option.value } data = filtered_domain_options(@chart_variable).collect do |chart_option| filtered_subjects.select{ |s| s.send(@chart_variable.id) == chart_option.value }.count end { name: option.display_name, data: data } end end
stacking()
click to toggle source
# File lib/spout/models/graphables/choices_vs_choices.rb, line 27 def stacking "percent" end
units()
click to toggle source
# File lib/spout/models/graphables/choices_vs_choices.rb, line 13 def units "percent" end