Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace in PDF Export #38

Open
jvisser opened this issue Oct 14, 2016 · 1 comment
Open

Whitespace in PDF Export #38

jvisser opened this issue Oct 14, 2016 · 1 comment

Comments

@jvisser
Copy link

jvisser commented Oct 14, 2016

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
Copy link
Author

jvisser commented Nov 7, 2016

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]);;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant