0
我想要format
我的time axis
在sapui5 line chart
与formatter
。用下面的代码SAPUI5折线图(vizframe)格式化程序功能找不到
dimensions: [{
name: 'time',
value: "{path:'_time', formatter: '" + Formatter.formatTime + "'}"
}],
出现这样的错误:
formatter function function (time) {
console.warn(time);
var r = time.toLocaleTimeString();
return r;
} not found! -
我formatter.js看起来是这样的:
sap.ui.define([
], function() {
"use strict";
var me = this;
return {
splitThingType: function (type) {
var t = type.split(':')[1];
return t;
},
formatTime: function (time) {
console.warn(time);
var r = time.toLocaleTimeString();
return r;
}
}
});
如果我不使用格式化图表的作品,但没有按看起来不错。