Highcharts导出图表exportSettings与SVG文件

我想用.Net Core项目渲染地图文件

因此,目的是在Javascript中间件上执行Highmaps库,并将svg文件导出到“node-export-server”。

我有一个从客户端接收一些数据的API。 我想用Highmap库生成SVG地图文件,然后发送到另一个API中,该API将包含一个中间件来执行节点模块或者PNG / JPG / …导出。

什么是将svg文件传递到“node-export-server”模块的方法? 我读了关联文档,但我没有find方式…( https://github.com/highcharts/node-export-server/blob/master/README.md )

我想通过我的SVG文件与此示例。

//Include the exporter module const exporter = require('highcharts-export-server'); //Export settings var exportSettings = { type: 'png', options: { title: { text: 'My Chart' }, xAxis: { categories: ["Jan", "Feb", "Mar", "Apr", "Mar", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }, series: [ { type: 'line', data: [1, 3, 2, 4] }, { type: 'line', data: [5, 3, 4, 2] } ] } }; //Set up a pool of PhantomJS workers exporter.initPool(); //Perform an export /* Export settings corresponds to the available CLI arguments described above. */ exporter.export(exportSettings, function (err, res) { //The export result is now in res. //If the output is not PDF or SVG, it will be base64 encoded (res.data). //If the output is a PDF or SVG, it will contain a filename (res.filename). //Kill the pool when we're done with it, and exit the application exporter.killPool(); process.exit(1); }); 

       

网上收集的解决方案 "Highcharts导出图表exportSettings与SVG文件"