mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 20:54:03 +00:00
* Clean up legacy charting imports * Update existing donut and line charts * Create helpers for parsing out existing chart data * Move chart partials to a more common path
10 lines
607 B
Text
10 lines
607 B
Text
= bar_chart @survey.survey_questions.map{ |q| [q.title, q.survey_replies.count] }
|
|
|
|
- @survey.survey_questions.each.with_index(1) do |survey_question, question_index|
|
|
.panel.panel-default
|
|
.panel-heading
|
|
= render partial: 'survey_question_title', locals: { survey_question: survey_question, question_index: question_index }
|
|
.panel-body
|
|
- question_replies = survey_question.survey_replies
|
|
- if question_replies.any?
|
|
= pie_chart question_replies.group(:text).count, library: { legend: 'bottom', plotOptions: { pie: { dataLabels: { enabled: false }, showInLegend: true } } }
|