将HighChart 3D饼图导出为png不起作用

时间:2018-07-27 04:48:01

标签: node.js highcharts

我正在使用 highcharts-export-server 库将高级图表JSON转换为PNG。它适用于普通图表。但是,即使我设置了3D选项,我也会得到正常的饼图。但是它在浏览器中按预期工作。

    {
  "options": {
    "plotOptions": {},
    "exporting": false,
    "credits": {
      "enabled": false
    },
    "series": [
      {
        "data": [],
        "name": "Distribution by pps",
        "type": "pie",
        "colorByPoint": true
      }
    ],
    "title": {
      "text": "Distribution by pps"
    },
    "chart": {
      "options3D": {
        "alpha": 45,
        "enabled": true,
        "beta": 0
      },
      "type": "pie"
    }
  },
  "type": "png"
}

1 个答案:

答案 0 :(得分:1)

很可能是因为您的错位错别字。您需要将"options3D":更改为"options3d":,然后尝试导出图表。

API参考:https://api.highcharts.com/highcharts/chart.options3d