Highcharts does not work with wicked_pdf

I am trying to create a PDF report using Wicked_pdf gem and Highcharts. I already tried to install animation, enableMouseTrackingand shadowfalse. But when wkhtmltopdf tries to generate PDF files, I got an error.

I really have nothing to do, because when I do the same procedure for HTML, Highcharts displays fine.

+5
source share
2 answers

I fixed it by setting the following options:

plotOptions:
  line:
    animation: false
    enableMouseTracking: false
    shadow: false

Also, be sure to enable jQuery and embed your styles and scripts.

+5
source

Try installing this:

series: { 'enableMouseTracking: false, shadow: false, animation: false' : nil}

This solution worked for me. I have a pdf view, and an html view and an implemented solution:

<more highchart options>
...
plotOptions: {
                  line: {
                    marker: {
                      enabled: false
                    },
                    dashStyle: 'ShortDash'
                  },
                  series: { #{request.format == 'pdf' ? 'enableMouseTracking: false, shadow: false, animation: false' : nil} }
                },
...
<more highchart options>
+4

All Articles