It is currently Fri Oct 24, 2014 3:31 pm Advanced search

Highcharts 2.0 / wkhtmltopdf

Technical support, bug reports and more.

Highcharts 2.0 / wkhtmltopdf

Postby jus101 » Wed Jul 14, 2010 6:15 am

Hi, has anyone tried Highcharts 2.0 with wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/)?
I'm getting rendering issues with strokes:

Capture.PNG
Capture.PNG (55.98 KiB) Viewed 3565 times


Not sure if the problem is with wkhtmltopdf (i searched their issue log, but couldn't find anything) or a server config issue (something to to with QT maybe).

Any info appreciated
jus101
 
Posts: 21
Joined: Mon May 24, 2010 11:02 pm

Re: Highcharts 2.0 / wkhtmltopdf

Postby torstein.honsi » Wed Jul 14, 2010 11:44 am

Are you using the latest wkhtmltopdf version?

What you are seeing is the tracker path that is supposed to have a stroke-opacity of 0.05, but it seems like wkhtmltopdf is not able to render this. If you set enabledMouseTracking and shadows to false in your chart, you'll get a decent looking chart.

I don't know why wkhtmltopdf is not able to handle this. As seen from your transparent areas, it seems to handle fill-opacity well. Even older webkit implementations like Safari 3 have got this right.
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9200
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: Highcharts 2.0 / wkhtmltopdf

Postby jus101 » Wed Jul 14, 2010 10:29 pm

I'm using the lateset version (wkhtmltopdf-0.10.0_beta4-static-i386).
Thanks for the mouse tracking/shadows tip.
jus101
 
Posts: 21
Joined: Mon May 24, 2010 11:02 pm

Re: Highcharts 2.0 / wkhtmltopdf

Postby ian » Fri Jul 23, 2010 9:01 pm

There are a few threads in this forum that give hints on how to make Highcharts work with wkhtmltopdf.

Just for reference, here is a snippet that stitches together those suggestions and solves the display problems.

Code: Select all
<script type="text/javascript" charset="utf-8">

  var chart = new Highcharts.Chart({
      chart: { renderTo: 'container' },
     
      // These make it work nicely with wkhtmltopdf
      plotOptions: { series: { enableMouseTracking: false, shadow: false, animation: false } },
     
      xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] },
      series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }]

  });
 
</script>
ian
 
Posts: 1
Joined: Fri Jul 23, 2010 7:52 pm

Re: Highcharts 2.0 / wkhtmltopdf

Postby cgreene » Wed Dec 01, 2010 4:58 pm

I don't know if anyone with highcharts can provide additional info to the wkhtmltopdf people but there is a bug filed here:
http://code.google.com/p/wkhtmltopdf/is ... ail?id=371

This one bit me too and is somewhat inconvenient, though at least a workaround/fix is available.
cgreene
 
Posts: 1
Joined: Wed Dec 01, 2010 4:57 pm

Re: Highcharts 2.0 / wkhtmltopdf

Postby hfrntt » Thu Dec 02, 2010 2:25 pm

Do you mean these gray area? It's mouse tracker area I don't know why wkhtmltopdf doesn't respect opacity but if you'd look to a comments on page which link you posted you'll see some advices.
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am


Return to Highcharts Usage

Who is online

Users browsing this forum: Rand M., Yahoo [Bot] and 12 guests