Sha256: 564947bcd7e35afb94c199420fab9bd300bb1750c5cf7db7a75dbb571412b745
Contents?: true
Size: 606 Bytes
Versions: 3
Compression:
Stored size: 606 Bytes
Contents
<div class="col-md-6"> <canvas id="<%=prefix.to_s.camelize %>PieChart" ></canvas> </div> <div class="col-md-6"> <div id="<%=prefix.to_s.camelize%>PieChartLegend"></div> </div> <% chart = chart_pie_from_rows(rows, x, y) %> <% content_for :script do %> $(function(){ "use strict"; var data = <%=raw chart[:datasets] %>; var ctx = document.getElementById("<%=prefix.to_s.camelize %>PieChart").getContext("2d"); var chart = new Chart(ctx).Pie(data, {responsive: true}); $('#<%=prefix.to_s.camelize %>PieChartLegend').html(chart.generateLegend()); <%= yield :chartjs_script %> }); <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems