Class: Quby::Questionnaires::Entities::Charting::LineChart

Inherits:
Chart
  • Object
show all
Defined in:
lib/quby/questionnaires/entities/charting/line_chart.rb

Instance Attribute Summary collapse

Attributes inherited from Chart

#chart_type, #key, #plotbands, #plotlines, #plottables, #tick_interval, #title, #y_categories, #y_range, #y_range_categories

Instance Method Summary collapse

Methods inherited from Chart

#default_y_range, #type

Constructor Details

#initialize(key, y_label: nil, tonality: :lower_is_better, baseline: nil, clinically_relevant_change: nil, **kwargs) ⇒ LineChart

Returns a new instance of LineChart.



23
24
25
26
27
28
29
# File 'lib/quby/questionnaires/entities/charting/line_chart.rb', line 23

def initialize(key, y_label: nil, tonality: :lower_is_better, baseline: nil, clinically_relevant_change: nil, **kwargs)
  super(key, **kwargs)
  self.y_label = y_label
  self.tonality = tonality
  self.baseline = baseline
  self.clinically_relevant_change = clinically_relevant_change
end

Instance Attribute Details

#baselineObject



31
32
33
# File 'lib/quby/questionnaires/entities/charting/line_chart.rb', line 31

def baseline
  @baseline_proc ||= make_baseline_proc
end

#clinically_relevant_changeFloat

Returns:

  • (Float)


21
22
23
# File 'lib/quby/questionnaires/entities/charting/line_chart.rb', line 21

def clinically_relevant_change
  @clinically_relevant_change
end

#tonalitySymbol

Returns:

  • (Symbol)


15
16
17
# File 'lib/quby/questionnaires/entities/charting/line_chart.rb', line 15

def tonality
  @tonality
end

#y_labelString

@deprecated, not used anymore

Returns:

  • (String)


12
13
14
# File 'lib/quby/questionnaires/entities/charting/line_chart.rb', line 12

def y_label
  @y_label
end