我在Google图表中使用了chartkick.js。我的问题是关于如何在工具提示中更改格式,例如货币格式。
电流:
在Highchrats,我们可以使用:
Highcharts.setOptions({
global: {
useUTC: false,
},
lang: {
decimalPoint: ',',
thousandsSep: '.'
}
});
然后
tooltip: {
pointFormat: "Value: {point.y:.2f} mm"
}
我的图片代码如下:
data = [
{"name":"2015", "data": gon.serie1},
{"name":"2014", "data": gon.serie2}];
new Chartkick.LineChart("chart-1", data, {
"library":
{
"backgroundColor" : "white"
},
"discrete": true
});
如何使用googlechart适配器为chartkick.js
实现相同目的一些数据:
[["Jan", "69.880,65", "Hello"], ["Fev", "45.613,46", "Hello"], ["Mar", "60.895,95", "Hello"], ["Abr", "46.559,75", "Hello"], ["Mai", "45.598,76", "Hello"], ["Jun", "54.398,26", "Hello"], ["Jul", "27.309,40", "Hello"], ["Ago", "48.609,09", "Hello"], ["Set", "71.448,70", "Hello"], ["Out", "103.479,39", "Hello"], ["Nov", "103.451,56", "Hello"], ["Dez", "71.913,10", "Hello"]]