0
我们在使用Angular JS的应用程序中使用Highcharts。我想设置用户文化中的金额格式,这是我从$ locale服务收到的特定格式。闯民宅的链接之后我就有点知道,我们能为Highcharts设置以下属性值:如何使用Angular JS在Highcharts中设置'lang'属性?
Highcharts.setOptions({
lang: {
thousandsSep: ','
}
});
但是Highcharts没有定义,而在我的代码写它,我得到错误,即使我设置也没有工作在配置对象中只有lang属性:
function extendBaseConfiguration(config) {
// these options are the default for all the charts. Pass in an object to override these values (or just change them once they're returned)
return $.extend(true, {
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false,
borderWidth: 0
},
plotOptions: {
column: {
grouping: false,
pointPadding: 0.2,
borderWidth: 0
}
},
lang: {
decimalPoint: $locale.NUMBER_FORMATS.DECIMAL_SEP,
thousandsSep: $locale.NUMBER_FORMATS.GROUP_SEP
},
tooltip: { pointFormat: '{series.name}: {point.y}'},
exporting: {enabled: true},
credits: {enabled: false}
}, config);
}
因此,如何或在哪里可以注入此Highcharts以便我可以设置它的值。还是有任何其他技术,我可以使用户文化特定格式的数量。