mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
trying to fix histogram
This commit is contained in:
parent
712d8baa18
commit
bf382b4638
3 changed files with 2 additions and 6 deletions
|
|
@ -1,7 +1,3 @@
|
|||
module QuestionsHelper
|
||||
|
||||
def format_question(question_text)
|
||||
question_text.gsub("[Field-MathTeacher][Field-ScienceTeacher][Field-EnglishTeacher][Field-SocialTeacher]", "teacher")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
.col-12.col-md-6.py-3
|
||||
.question.p-2{id: "question-#{question.id}"}
|
||||
%p.question-text.pt-3.px-2
|
||||
= format_question(question.text)
|
||||
= question.text
|
||||
|
||||
.row.pt-2
|
||||
.col-4.indicator-container.centered
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
%tbody
|
||||
- data.question.options_with_reverse.each_with_index do |option, index|
|
||||
%tr.answer
|
||||
- group = histogram[(index + 1).to_s]
|
||||
- group = histogram[index.to_s]
|
||||
- width = (100 * (group.blank? ? 0 : group.length)) / histogram.values.flatten.length
|
||||
%td.text
|
||||
= "#{option}:"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue