Node-html-pdf: Can this work with chart.js?

Created on 28 Jul 2017  路  5Comments  路  Source: marcbachmann/node-html-pdf

I'm trying to get piecharts to render in the report i'm building. Presently it's just showing blank. Is there a a way to delay a few milliseconds after the charts are produced?

Most helpful comment

Hi, I got this module to work with my HTML with Chart.js and common issues and fix would include disabling your chart animations to prevent half rendered charts and extending the timeout of phantomjs.

With respect to getting a blank chart, my issue is usually caused by uncaught javascript errors or the using of some ES6 syntax such as template literals, hence, you might want to look into that.

You can refer to my code:
https://gist.github.com/chuabingquan/9827a3eb09cd4a2e27cf95dff7f09176

Still im unable to render charts in generated PDF. Can some one guide me or post sample code ? I have tried renderingDelay also .

All 5 comments

Hi, I got this module to work with my HTML with Chart.js and common issues and fix would include disabling your chart animations to prevent half rendered charts and extending the timeout of phantomjs.

With respect to getting a blank chart, my issue is usually caused by uncaught javascript errors or the using of some ES6 syntax such as template literals, hence, you might want to look into that.

You can refer to my code:
https://gist.github.com/chuabingquan/9827a3eb09cd4a2e27cf95dff7f09176

I have been trying to include the highcharts in the pdf and I was also getting the same issue(i.e. half rendered charts).
Is there a way to include the timeout so that the scripts will be rendered before the pdf is getting created.

There's a renderDelay option in v2.2.0.

Hi, I got this module to work with my HTML with Chart.js and common issues and fix would include disabling your chart animations to prevent half rendered charts and extending the timeout of phantomjs.

With respect to getting a blank chart, my issue is usually caused by uncaught javascript errors or the using of some ES6 syntax such as template literals, hence, you might want to look into that.

You can refer to my code:
https://gist.github.com/chuabingquan/9827a3eb09cd4a2e27cf95dff7f09176

Still im unable to render charts in generated PDF. Can some one guide me or post sample code ? I have tried renderingDelay also .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rayax86 picture rayax86  路  5Comments

tsp1996 picture tsp1996  路  5Comments

RodolfoSilva picture RodolfoSilva  路  3Comments

cmoulliard picture cmoulliard  路  3Comments

tashikomaaa picture tashikomaaa  路  5Comments