I’m trying to make chartkick work with wicked_pdf but all it does is show a loading sign:
I’m using wicked_pdf version: 2.1.0, wkhtmltopdf-binary version:0.12.6.5
I’ve tried replacing it with wkhtmltopdf-binary-edge (0.12.6.0) with no luck.
Controller code:
respond_to do |format|
format.html
format.pdf do
render pdf:"report_page",
javascript_delay: 1000
end
end
.pdf.erb:
<%= javascript_include_tag "http://code.jquery.com/jquery-1.10.0.js" %>
<%= javascript_include_tag "http://code.jquery.com/ui/1.10.3/jquery-ui.js" %>
<%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" %>
<%= wicked_pdf_stylesheet_link_tag 'dashboard', media: 'all', 'data-turbolinks-track' => true %>
<%= wicked_pdf_stylesheet_link_tag('bootstrap') %>
<%= javascript_include_tag "https://www.google.com/jsapi" %>
<%= wicked_pdf_javascript_include_tag "chartkick" %>
<div class="container">
<%= line_chart data_for_pdf_student_graphs(data_here), id: "1-graph", width: "900px", height: "500px"%>
</div>
I can’t seem to figure out what to try next, I’ve tried using a high javascript_delay with no luck.