Forum How do I...?

Render Charts From HighCharts

jhorowitz
I'm trying to render a highcharts polar-spider graph (http://www.highcharts.com/demo/polar-spider) but it doesn't seem to be rendering.

Is it supported?
jhorowitz
I'm getting "Type error: invalid arguments"
mikeday
No, we recommend converting HighCharts to SVG for the time being.
jhorowitz
Sorry, this was an accidental post.

Edited by jhorowitz

jhorowitz
I see. Is it possible to convert the chart in prince or does it have to be done ahead of time?
mikeday
The type error is the error.
mikeday
Ahead of time, eg. using PhantomJS.

We do hope to support HighCharts in the future, but it requires a lot of interactivity, similar to browsers.
jhorowitz
Thanks.
hallvord
Hello jhorowitz,
I think I have a workaround for your spider chart: see https://github.com/yeslogic/prince-scripts/tree/master/compatibility/Highcharts/compat.js

This is a script that tweaks Prince's DOM and JS environment slightly in order to make it more compatible with Highcharts. I've tested it against the demo you linked to and it seems to make it render OK.

Note that some parts of this script are hackish, and might cause a fallout for other scripts running on the same page. Feel tre to try to tweak the values and/or the script locally if it helps for your specific projects..

Announcement: repos for tests/utils