Sha256: 153c1d3d8a749da8622f1ed29b1f06365b55be7b9d6685b70cdc9678989278af

Contents?: true

Size: 613 Bytes

Versions: 7

Compression:

Stored size: 613 Bytes

Contents

panel do
  title 'Questionnaire With Chart'

  question :v_1, type: :string do
    title 'Title 1'
  end

  question :v_2, type: :string do
    title 'Title 2'
  end

  question :v_3, type: :string do
    title 'Title 3'
  end
end

score :total, :label => 'Total', schema: [{key: :value, export_key: :tot, label: 'Score'}] do
  {value: sum(values('v_1', 'v_2', 'v_3')) / 3.0}
end

overview_chart do
  subscore :value
  y_max 100
end

line_chart :tot do
  range 0..100
  plot :total
  plot :v_1, label: 'Label 1'
  plot :v_2
  plot :v_3
  plotband 30, 50, :yellow
  plotband 50, 80, :red
  plotline 20, :green
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
quby-5.6.6 spec/fixtures/questionnaire_with_chart.rb
quby-5.6.5 spec/fixtures/questionnaire_with_chart.rb
quby-5.6.3 spec/fixtures/questionnaire_with_chart.rb
quby-5.6.2 spec/fixtures/questionnaire_with_chart.rb
quby-5.6.1 spec/fixtures/questionnaire_with_chart.rb
quby-5.6.0 spec/fixtures/questionnaire_with_chart.rb
quby-5.5.0 spec/fixtures/questionnaire_with_chart.rb