Sha256: 042d6d1a32a3944690a9c1268a7b9f07ce73e21347b6925d7b27fcab455b5598
Contents?: true
Size: 1.9 KB
Versions: 1
Compression:
Stored size: 1.9 KB
Contents
<br/> <div> <%= form_tag(analytics_audits_path) do %> Begin: <%= text_field_tag('analytics[range_begin]', @range_begin)%> End: <%= text_field_tag('analytics[range_end]', @range_end)%> <%= submit_tag('filter')%> <% end %> </div> <br/> <br/> <div class='left'> <div id='analyticsByUser'>Total user clicks : <%= @total %></div> <br/> <canvas id="userViews" height="300" width="400"></canvas> <script> var barChartData = { labels : <%= "#{@analysis_by_user_name.keys}".html_safe %>, datasets : [ { fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : <%= @analysis_by_user_name.values %> } ] } var myBar = new Chart(document.getElementById("userViews").getContext("2d")).Bar(barChartData, {scaleLineWidth : 2, scaleLineColor : "rgba(0,0,0,.1)", scaleSteps : <%= @analysis_by_user_name.values.max/5 + 2%>, scaleOverride : true, scaleStepWidth: 5}); </script> </div> <div class='left'> <div id='analyticsByPage'>Total page views: <%= @total %></div> <br/> <canvas id="pageViews" height="300" width="400"></canvas> <script> var lineChartData = { labels : <%= "#{@analysis_by_page_views.keys}".html_safe %>, datasets : [ { fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : <%= @analysis_by_page_views.values %> } ] } var myLine = new Chart(document.getElementById("pageViews").getContext("2d")).Line(lineChartData, {scaleLineWidth : 2, scaleLineColor : "rgba(0,0,0,.1)", scaleSteps : <%= @analysis_by_user_name.values.max/5 + 2%>, scaleOverride : true, scaleStepWidth: 5}); </script> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
audit_rails-1.1.7 | app/views/audit_rails/audits/analytics.html.erb |