Sha256: 13783c47da27c62fd4be7bf8a3c9cb5effc9718753ef2da07f163ac3a7e22577

Contents?: true

Size: 622 Bytes

Versions: 12

Compression:

Stored size: 622 Bytes

Contents

# frozen_string_literal: true

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
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
quby-5.0.1 spec/fixtures/questionnaire_with_chart.rb
quby-5.0.0 spec/fixtures/questionnaire_with_chart.rb
quby-4.0.4 spec/fixtures/questionnaire_with_chart.rb
quby-5.0.0.pre4 spec/fixtures/questionnaire_with_chart.rb
quby-5.0.0.pre3 spec/fixtures/questionnaire_with_chart.rb
quby-5.0.0.pre2 spec/fixtures/questionnaire_with_chart.rb
quby-5.0.0.pre1 spec/fixtures/questionnaire_with_chart.rb
quby-4.0.3 spec/fixtures/questionnaire_with_chart.rb
quby-4.0.2 spec/fixtures/questionnaire_with_chart.rb
quby-4.0.1 spec/fixtures/questionnaire_with_chart.rb
quby-4.0.0 spec/fixtures/questionnaire_with_chart.rb
quby-3.2.2 spec/fixtures/questionnaire_with_chart.rb