Facing error in generating the chart using the sample test code mentioned in node-export-server git repository

38 Views Asked by At

I am facing issue in generating the charts in my local. I have followed the steps mentioned in the 'https://github.com/highcharts/node-export-server' and used npm install for installing post cloning the repo. I have agreed to the license terms and for High Chart version the supplied value is 11.0.0. Post that I ran the server using the command node ./bin/cli.js --enableServer 1.

The request used as input is below:

curl -H "Content-Type: application/json" -X POST -d '{"infile":{"title": {"text": "Steep Chart"}, "xAxis": {"categories": ["Jan", "Feb", "Mar"]}, "series": [{"data": [29.9, 71.5, 106.4]}]}}' 127.0.0.1:7801 -o mychart.png

Server Side the following error is presented: __ ___ __ __ __
/ / / ()__ / / / / ____ / /
/ /
/ / / __ / __ \/ ___/ __ \/ __ / __/ __/ /
/ __ / / /
/ / / / / /
/ / / / /
/ / / / /
(
)
// ///_, // //_// //_,// _//
/// __ _____
/ / ______ ____ / / / / ______ _____ _____ / __/ | |// __ / __ / / / _ / _ / __/ | / / _ / / / /> </ // / // / / / / __/ / / / | |/ / / /
/
/
/|
/ .
/_
/
/ _
/ /
_/_
// |/_//
/
/

  [error] work 
  9e5b7d24514a4b7785927e1e23956e55 could not be completed, sending: an error occured when rendering the chart: SyntaxError: Unexpected token { in JSON at position 24432

System Details in which this is tried: Node -v18.17.1 npm -9.6.7 node-export-server-2.1.0 high chart - 11.0.0 OS - Ubuntu 20.04.6 `

0

There are 0 best solutions below