-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart.html.erb
39 lines (39 loc) · 1.37 KB
/
chart.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<div class="container">
<div class='row chart_row'>
<div class='col-lg-12'>
<div class='chart'>
<canvas id="chart_canvas" width="<%= meta[:chart_width] %>" height="<%= meta[:chart_height] %>"></canvas>
</div>
<div class='overlay'>
<canvas id="overlay_canvas" width="<%= meta[:chart_width] %>" height="<%= meta[:chart_height] %>"></canvas>
</div>
<% if meta[:display_legend] %>
<div class='legend'>
<canvas id="legend_canvas" width="<%= meta[:chart_width].to_i + meta.fetch(:legend_extra_width, 0).to_i %>" height="<%= meta[:chart_height] %>"></canvas>
</div>
<% end %>
<div class='ticks'>
<canvas id="ticks_canvas" width="<%= meta[:chart_width] %>" height="<%= meta[:chart_height] %>"></canvas>
</div>
</div>
</div>
</div>
<% if meta[:display_scoregrid] %>
<div class='container'>
<div class='row'>
<div class='col-lg-12'>
<table>
<% data[:labels].each_with_index do |l, index| %>
<tr>
<td bgcolor="<%= data[:colors][index] %>" width="25px"> </td>
<td width="10px"> </td>
<td><%= l %></td>
<td width="50px"> </td>
<td><%= sprintf('%.2f', data[:values][index]) %></td>
</tr>
<% end %>
</table>
</div>
</div>
</div>
<% end %>