0
votes

I´m trying to export a chart server side using phantomJs. After googling around for articles and examples of this using rails I found this api:

https://github.com/kbaum/highchart-image-api

which can be pretty much summed up by saying that is using phantomjs and highcharts-convert.js...and calling some rails code on the server.

Now, the problem relies on the beginning. After including all the resources in the latest link an Uncaught ReferenceError: require is not defined error comes up on line 36 of highcharts-convert.js and I can't seem to get out of this mess.

help?

PS: I added phantomjs with this gem

1
Maybe the problem is within that gem? According to readme from "highcharts-image-api", installation should be done via brew: gem install brew, brew install phantomjsPaweł Fus
I'm beginning to think that higcharts-convert and phantomjs is only ment to use server side so I think I really don't need it on the frontend. But still tests to be made...tostasqb
You are right, you don't need phantomJS and highcharts-convert if you want to use them on frontend :)Paweł Fus

1 Answers

0
votes

highcharts-convert should not be added in the frontend, it is meant to be used only on the server side by phantomjs