Highcharts, how to localize language when exporting

I'm exporting a chart through an API call to export.highcharts.com with a JSON blob. In JavaScript localization is set on the global HighCharts object, and that works fine while exporting because the Highcharts library calls the server with an SVG blob that contains the localization. But when I try to call the API with my JSON blob I can't find a way to add localization langauge. The API is called from my backend (Scala, not JavaScript).

Does anyone know how to call the export server for Highcharts (with a JSON blob) and get localized language?


A bit of a workaround is to use the callback POST parameter to Highcharts.setOptions and chart.redraw for the changes be visible.

For example (Russian JSFiddle example):

Highcharts.post("http://export.highcharts.com/", {
    filename: "chart",
    type: "image/png",
    callback: "function(chart) { Highcharts.setOptions({ lang:{ /* my lang */ } }); chart.redraw(); }",
    options: "{ /* my options */ };"
});
链接地址: http://www.djcxy.com/p/74454.html

上一篇: 强制Highcharts使用独立框架而不是jQuery?

下一篇: Highcharts,如何在出口时本地化语言