Had installed both phantomjs and highcharts export server on my local machine. I'm running a script through phantomjs similar to https://joekuan.wordpress.com/2012/09/22/phantomjs-a-new-way-for-running-highcharts-on-the-server-side/
var svg = page.evaluate(function(opt) {
Highcharts.setOptions ( {
exporting: {
url:'http://myserver:8080/export/'
}
} );
...
}, evalArg);
page.render(outputFilename); // save as png
phantom.exit();
It still able to save image even though myserver is down.
var chartOptions = {
chart: {
renderTo: 'container'
},
exporting: {
url: 'http://myserver:8080/export/'
},
...
};
var chart = new Highcharts.Chart(chartOptions);
Specifying the url under the chartOptions also doesn't help. It still able to save image even though myserver is down.
I even tried add it to
return chart.getSVG({
exporting: {
url: 'http://myserver:8080/export/'
}
});
but to no avail. Note: specifying the first option in jsp before the chart load works. Highcharts.setOptions ( { exporting: { url:'http://myserver:8080/export/' } } );
Anyone has any idea what's the correct way of passing my local export server url to Highcharts.
Thanks