exporting highcharts polar chart to PDF with phantomjs -


i'm evaluating highcharts client project , have run problem rendering polar chart phantomjs. charts lines come out thick grey blob! thought due animation thats turned off. try , post image have thoughts on else causing this? if print preview chrome looks ok.

here's image.

this created part of report built using rasterize.js script included phantomjs. other charts work fine, polar chart 1 not coming out. if use highcharts export server script phantomjs works fine - allows 1 chart exported pdf. need export whole web page pdf including charts.

there's workaround on project's bug tracking:

https://github.com/ariya/phantomjs/issues/10364#issuecomment-14992612

all need remove page elements low opacity before rendering file:

diff --git a/examples/rasterize.js b/examples/rasterize.js index fcd74cd..dcc81d4 100644 --- a/examples/rasterize.js +++ b/examples/rasterize.js @@ -19,6 +19,16 @@ if (phantom.args.length < 2 || phantom.args.length > 3) {              console.log('unable load address!');          } else {              window.settimeout(function () { +                // remove low-opacity paths. see phantomjs  issue #364  +                page.evaluate(function () { +                    var paths = document.getelementsbytagname("path"); +                    (var = paths.length - 1; >= 0; i--) { +                        var path = paths[i]; +                        var strokeopacity = path.getattribute('stroke-opacity'); +                        if (strokeopacity != null && strokeopacity < 0.2) +                            path.parentnode.removechild(path); +                    } +                });                  page.render(output);                  phantom.exit();              }, 200); 

you can use grab graphs if don't have access source of page containing graph.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -