Module: ScaptimonyReportDashboardHelper
- Defined in:
- app/helpers/scaptimony_report_dashboard_helper.rb
Constant Summary collapse
- Colors =
{ :passed => '#89A54E', :failed => '#AA4643', :othered => '#DB843D', }
Instance Method Summary collapse
Instance Method Details
#reports_breakdown_chart(report, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/scaptimony_report_dashboard_helper.rb', line 9 def reports_breakdown_chart(report, = {}) data = [] [[:failed, _('Failed')], [:passed, _('Passed')], [:othered, _('Othered')], ].each { |i| data << {:label => i[1], :data => report[i[0]], :color => Colors[i[0]]} } flot_pie_chart 'overview', _('Compliance reports breakdown'), data, end |