A---- / highcharts-export-clientside

Module for Highcharts to exports charts client-side
http://a----.github.io/highcharts-export-clientside/
The Unlicense
49 stars 37 forks source link

Whitespace in PDF Export #38

Open jvisser opened 8 years ago

jvisser commented 8 years ago

Fiddle: http://jsfiddle.net/0w6audhr/1/

The exported PDF has in the fiddle has a lot of whitespace on the right side of the chart. This seems to relate to the hight of the chart container in some way. A Container height above 1500px fails to produce a PDF completely.

Image based exports work fine.

jvisser commented 8 years ago

I found a solution to the problem: Render the chart in portait mode.

In renderPdf change the following line.

var doc = new jsPDF('l', 'mm', [context.destWidth, context.destHeight]);; 

to

var doc = new jsPDF('p', 'mm', [context.destWidth, context.destHeight]);;