highcharts导出服务器不执行回调并返回错误

highcharts导出服务器不执行回调并返回错误,highcharts,Highcharts,我已经安装了Highcharts导出服务器,可以从命令行创建.png 但是,如果我添加了回调参数,图表生成成功,但是回调函数没有被调用,并且出现了错误 命令行: highcharts-export-server -infile 'c:\temp\console.json' -outfile 'c:\temp\test.png' --type 'png' -callback 'c:\temp\callback.js' function(chart) { chart.renderer.label

我已经安装了Highcharts导出服务器,可以从命令行创建.png

但是,如果我添加了回调参数,图表生成成功,但是回调函数没有被调用,并且出现了错误

命令行:

highcharts-export-server -infile 'c:\temp\console.json' -outfile 'c:\temp\test.png' 
--type 'png' -callback 'c:\temp\callback.js'
function(chart) {
chart.renderer.label('This label is added in the callback', 100, 100)
    .attr({
        fill : '#90ed7d',
        padding: 10,
        r: 10,
        zIndex: 10
    })
    .css({
        color: 'black',
        width: '100px'
    })
    .add();
  }
phantom worker 1 unexpected data - SyntaxError: Unexpected token ':'

undefined:1 in appendChild
:15
:16
{"filename":"c:\\temp\\test.png"}
Callback.js:

highcharts-export-server -infile 'c:\temp\console.json' -outfile 'c:\temp\test.png' 
--type 'png' -callback 'c:\temp\callback.js'
function(chart) {
chart.renderer.label('This label is added in the callback', 100, 100)
    .attr({
        fill : '#90ed7d',
        padding: 10,
        r: 10,
        zIndex: 10
    })
    .css({
        color: 'black',
        width: '100px'
    })
    .add();
  }
phantom worker 1 unexpected data - SyntaxError: Unexpected token ':'

undefined:1 in appendChild
:15
:16
{"filename":"c:\\temp\\test.png"}
错误:

highcharts-export-server -infile 'c:\temp\console.json' -outfile 'c:\temp\test.png' 
--type 'png' -callback 'c:\temp\callback.js'
function(chart) {
chart.renderer.label('This label is added in the callback', 100, 100)
    .attr({
        fill : '#90ed7d',
        padding: 10,
        r: 10,
        zIndex: 10
    })
    .css({
        color: 'black',
        width: '100px'
    })
    .add();
  }
phantom worker 1 unexpected data - SyntaxError: Unexpected token ':'

undefined:1 in appendChild
:15
:16
{"filename":"c:\\temp\\test.png"}
问候

Normen

我收到了一个类似的错误-似乎是加载一个文件作为回调。我建议在github上报告这个bug,感谢您的测试。我报告了github上的一个bug。