我在我的应用程序中使用sap.viz库,它正在使用我的笔记本电脑,但是当我将其上传到服务器上时,我收到以下错误,我无法理解导致此错误的原因,就像我做的那样包括' sap.viz'在我的index.html中,任何帮助理解这一点都将受到高度赞赏
错误:
Uncaught TypeError: b._toInstance is not a function
at eval (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…ry-preload.json/sap/viz/ui5/controls/common/feeds/AnalysisObject.js:12:133)
at Array.map (native)
at Function.sap.viz.ui5.controls.common.feeds.AnalysisObject.toInstances (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…ry-preload.json/sap/viz/ui5/controls/common/feeds/AnalysisObject.js:12:101)
at f.sap.viz.ui5.controls.common.feeds.FeedItem._toInstance (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…z/library-preload.json/sap/viz/ui5/controls/common/feeds/FeedItem.js:7:476)
at eval (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…/library-preload.json/sap/viz/ui5/controls/common/feeds/FeedItem.js:13:127)
at Array.map (native)
at Function.sap.viz.ui5.controls.common.feeds.FeedItem.toInstances (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…z/library-preload.json/sap/viz/ui5/controls/common/feeds/FeedItem.js:13:95)
at Object.sap.viz.ui5.controls.common.helpers.VizControlsHelper.getFeedInstances (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/reso…reload.json/sap/viz/ui5/controls/common/helpers/VizControlsHelper.js:7:140)
at d.sap.viz.ui5.controls.VizFrame._updateVizFrame (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/resources/sap/viz/library-preload.json/sap/viz/ui5/controls/VizFrame.js:28:245)
at d.sap.viz.ui5.controls.VizFrame._createChildren (http://ocsd051a.eu.unilever.com:8000/sap/bc/ui5_ui5/sap/zstandupreport/resources/sap/viz/library-preload.json/sap/viz/ui5/controls/VizFrame.js:30:110)
(anonymous) @ AnalysisObject.js:12
sap.viz.ui5.controls.common.feeds.AnalysisObject.toInstances @
AnalysisObject.js:12
sap.viz.ui5.controls.common.feeds.FeedItem._toInstance @ FeedItem.js:7
(anonymous) @ FeedItem.js:13
sap.viz.ui5.controls.common.feeds.FeedItem.toInstances @ FeedItem.js:13
sap.viz.ui5.controls.common.helpers.VizControlsHelper.getFeedInstances @
VizControlsHelper.js:7
sap.viz.ui5.controls.VizFrame._updateVizFrame @ VizFrame.js:28
sap.viz.ui5.controls.VizFrame._createChildren @ VizFrame.js:30
sap.viz.ui5.controls.common.BaseControl._render @ BaseControl.js:15
sap.viz.ui5.controls.common.BaseControl.onAfterRendering @ BaseControl.js:10
a._callEventHandles @ sap-ui-core.js:144
a._handleEvent @ sap-ui-core.js:144
f @ sap-ui-core.js:144
R.flush @ sap-ui-core.js:144
R.render @ sap-ui-core.js:144
U.rerenderControl @ sap-ui-core.js:144
a.rerender @ sap-ui-core.js:144
U.rerender @ sap-ui-core.js:144
n.renderPendingUIUpdates @ sap-ui-core.js:144
(anonymous) @ sap-ui-core.js:135
答案 0 :(得分:0)
我没有正确提供'feedPrimaryValues',一旦纠正了问题就得到了解决。现在图表正在按预期呈现。