score:6
I finally solved the problem. I guess there is mis-understanding in the so called "JSON" string. The Javascript export server does not accept any real "JSON" string. A real "JSON" string would have all strings quoted, some thing like
{
"value": [1,2,3],
"name": "jack"
}
What the export server accepts are actually a piece of Javascript code to create a Javascript object, like:
{
value: [1,2,3],
name: "jack"
}
This is because the server will use this string as part of the Javascript code in the generated webpage. I wrote a small function to convert JSON string into this format and pass it to the server, it finally works.
var getUnQuotedJsonString = function (str) {
return str.replace(/"\w+":/g, function(s, key) {
return s.replace(/"/g, "");
});
}
score:-1
This is because the Phantoms HTTP server which is started by
phantomjs highcharts-convert.js -host ... -port ...
expects the parameters send in JSON format. Please read, the documentation, parapgraph 'start as a webserver'
Out of curiosity... what typo did you found?
score:-1
I wrote a similar function to solve this for PHP if anyone is looking to remove the quotes from the result of json_encode
-
function unQuote($str){
return preg_replace_callback('/"\w+":/',
function ($match){
return str_replace('"', '', $match[0]);
},
$str );
}
score:0
I got that same error when I tried to send in a JSON string that was longer than what my server hosting the highcharts exporter WAR file would accept. Check your message length parameter in your server. Make sure it is long enough to hold the request sent. Now, since you do not mention what export server you are using (java or PHP) I would imagine you did not actually set up the web front end for the export server and you just have the headless command line export set up (phantomJS + some highcharts js files). To use the exporting server for use in the front end (like when a user clicks on the export buttons on the web page) you also need to set up Java or PHP.
Source: stackoverflow.com
Related Query
- I can't make Highcharts phantomJs export server work
- Highcharts phantomjs export server can't parse json string
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- How to update the highcharts.js to make the export server to my own ipaddress,instead of connect to the highcharts server?
- Highcharts SVG Export from Python Server Side Code
- Highcharts export web war does not work on Weblogic server
- Error with PhantomJS when installing Highcharts export server on Azure VM (Ubuntu 20.04)
- Exporting Charts on server side with Highcharts and PhantomJS to make a custom PDF
- Export Highcharts to PDF (using javascript and local server - no internet connection)
- Make datepicker work with highcharts
- ASP.NET WebRequest to Highcharts export server
- Issues using highcharts node export server from ClojureScript - "0x03 error when performing chart generation"
- HIghcharts export server hosting ph-batik
- Highcharts Export Server on AWS Lambda
- highcharts export server js script error codes
- HighCharts Export Server not creating image
- Use of DotNet HighCharts dll to make charts in code behind
- Highcharts datalabel formatter for export server
- Highcharts - How to export graphic server side?
- incorrect highcharts export server js script error codes
- Overriding log scale with highcharts export server
- Add Source to Highcharts Export CSV
- Highcharts Export server - Can't generate image using --options
- Highcharts export (PhantomJS) to server does not show words
- highcharts export server not working out of the box (Java)
- Issues Getting Highcharts Export Server Running Under iisnode
- Highcharts Node.js export server : Connection error
- Callback function doesn't work Highcharts PhantomJS
- POST parameters for the Highcharts export server causes 407 Proxy Authentication Error
- Highcharts server side export Pie With Data Labels (phantomjs)
More Query from same tag
- Highcharts click function update series and cancel previous update
- Multiple charts in separate divs, single range and zoom picker
- Retain Marker color on Line History Series in Highchart
- Highcharts yAxis self-adaption issue
- Highcharts: how to change line color when hovering a scatterplot series
- Accessing hovered point data series highstock
- Highcharts change look of tooltip
- Local Angular library using Highcharts breaks in production mode
- highcharts: margin between two boxplot series
- HighCharts: loading from csv file, blank page in HTML/JS
- Highcharts 3 like menu button won't display
- How to use Highcharts theme with rCharts
- Highcharts - Replace nulls with 0
- How to set alignment of individual x-axis labels in Highcharts
- Datatime from CSV file to plot in Highstock JS error
- Tile layout for highcharts legend items
- How can I draw Highcharts horizontal stacked bar with date-time duration
- Highcharts date not showing correctly on x-axis
- Highchart- X-axis Irregular Time interval pointWidth
- How to add HighChart to Angular?
- HighchartsAdapter is no longer available, what is the new way to call adapterRun?
- Combine bullet and line chart in highcharts
- Multiple Axes on a Highcharts Heatmap
- Tooltip modification in Highchart Js
- How can I trigger the click function on the chart, when I click on a point?
- Highstock charts give "Uncaught TypeError: Cannot read property 'addPoint' of undefined" error
- how to use Kendo chart library in Server side
- Highcharts Server not loading infile correctly
- Date and time wrong on Highstock chart
- Stacked barchart in highcharter with molten data