我有一个带有 ControlWrapper 的 ComboChart,我只想在我的图表中看到小数点后两位的数字,所以我使用格式化程序,这是我的代码
view: {
columns: [
{
//transform the numbers into strings, so the steppedArea series will work
type: "string",
calc: function (dt, row) {
var date = dt.getValue(row, 2);
var formatter = new google.visualization.DateFormat({pattern:"dd/MM/yyyy HH:mm"});
return formatter.formatValue(date);
console.log(calc, typeof (calc));
}
},
{
type:"string",
calc: function (dt, row) {
var number = dt.getValue(row, 2);
var number = dt.getValue(row, 3);
var number = dt.getValue(row, 4);
var formatter = new google.visualization.NumberFormat({fractionDigits:2});
console.log(calc);
return formatter.formatValue(number);
}
},
6,7]
}
但我有这个错误:
一位或多位参与者绘制失败()×
给定轴上的所有系列必须具有相同的数据类型×
你可以帮帮我吗?