...
if(rowIndex == 0 && cellIndex == 1) {
return rowsData[0][1] * 100 + "%";
} else if (rowIndex == 1 && cellIndex == 1) {
return "$" + rowsData[1][1];
} else if (rowIndex == 2 && cellIndex == 1) {
return "$" + rowsData[2][1];
}
根据维度不同,数值的格式不同(维度必须显示在图形上面):
if(rowDataMap.指标 == '指标1' || rowDataMap.指标 == '指标2') {
return (cell * 100).toFixed(2) + '%';
} else {
return cell;
}
---------------------------------------------------------------------------------------------------------------------------
写法一:
var rowsData = rows.data();
return rowsData[0][4]+"%"; \\对表格中第一行第四列数据进行添加“%”处理
...