Sha256: 98ae27505738ed589a8cc30534cbe33b1c548c40c70c4b6a18c8a5842001cdbd

Contents?: true

Size: 1.43 KB

Versions: 6

Compression:

Stored size: 1.43 KB

Contents

- if [:pick_one,:pick_any,:dropdown,:number,:date,:datetime,:time,:stars,:slider,:grid_one, :grid_any, :grid_dropdown].include? q.question_type_id
  %tr{:class => q.surveyresponse_class(@response_sets)}
    %td  
  %tr{:class => q.surveyresponse_class(@response_sets)}
    %td
    %td
    %td
      - if q.display_type=='stars'
        - 10.times.each do |index|
          %input{name: "star#{q.id.to_s}", type: "radio", class: "star {split:2}", disabled: "disabled", checked: (index+1)==star_average(@responses,q) ? "checked" : nil} 
      - else
        %div{:id => "hi_chart#{q.id}", :style => "height:410px; margin: 0; clear:both; min-width: 800px"}
          = high_chart("hi_chart"+q.id.to_s , @chart[q.id.to_s]) do
            - if q.pick == 'one' && !([:grid_one, :grid_dropdown].include? q.question_type_id)
              = "options.tooltip.formatter = function() {return '<b>'+ this.point.name +'</b>: '+ this.y;}".html_safe
              = "options.plotOptions.pie.dataLabels = {}".html_safe
              = "options.plotOptions.pie.dataLabels.formatter = function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed()+' %';}".html_safe
            - elsif q.question_type_id == :grid_dropdown
              = "options.plotOptions.column.dataLabels.formatter = function() {if(this.y != 0) {return this.y;}}"
            - else
              = "options.tooltip.formatter = function() {return '<b>'+ this.x +'</b>: '+ this.y;}".html_safe

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
upgrade_surveyor_gui-0.1.3 app/views/surveyor_gui/reports/_graphs.html.haml
upgrade_surveyor_gui-0.1.2 app/views/surveyor_gui/reports/_graphs.html.haml
surveyor_gui-0.1.2 app/views/surveyor_gui/reports/_graphs.html.haml
surveyor_gui-0.1.1 app/views/surveyor_gui/reports/_graphs.html.haml
surveyor_gui-0.1.0 app/views/surveyor_gui/reports/_graphs.html.haml
surveyor_gui-0.0.3 app/views/surveyor_gui/reports/_graphs.html.haml