, JavaScript PDF. - PDF-, JavaScript, JavaScript , SVG.
Update:
, javascript - strokeDashoffset . , javascript , ...
<svg class="svg" width="200" height="200" viewPort="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0" stroke="#33aaa3"></circle>
<circle class="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
</svg>
, <% %>, PDF. JavaScript SVG - :
(, , )
<% @count = 1 %>
<% @skills.each do |skill| %>
<%
val = current_user.profile ? rating_by_skill(current_user.profile.id, skill.id) ? number_with_precision(rating_by_skill(current_user.profile.id, skill.id), :precision => 2) : 0 : 0 ;
val = val * 20;
// calculate the percentage the same way as in the javascript...
// and store it in a variable
pct = ((100-val)/100)*c;
%>
<div class="col-xs-3 ">
<div class="cont" id="cont-<%= @count %>" data-pct="100">
<svg class="svg" width="200" height="200" viewPort="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0" stroke="#33aaa3"></circle>
<circle class="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="<%= pct %>"></circle>
</svg>
</div>
<p><%= skill.title %></p>
</div>
<% @count += 1 %>
<% end %>
, "ruby" , stroke-dashoffset .
, , , . .