sapui5的项目符号图中未显示实际值

sapui5的项目符号图中未显示实际值,sapui5,Sapui5,我正在尝试splitApp,我在详细信息页面中使用了BulletChart,我想显示BulletChart(实际值应取自母版页所选项目) 我的主人,控制员: itemSelected:函数(){ var app=sap.ui.getCore().byId(“appid”); var list=sap.ui.getCore().byId(“listid”); var sitem=list.getSelectedItem(); var spath=sitem.oBindingContexts.dat

我正在尝试splitApp,我在详细信息页面中使用了BulletChart,我想显示BulletChart(实际值应取自母版页所选项目)

我的主人,控制员:

itemSelected:函数(){
var app=sap.ui.getCore().byId(“appid”);
var list=sap.ui.getCore().byId(“listid”);
var sitem=list.getSelectedItem();
var spath=sitem.oBindingContexts.data.spath;
var oitem=sap.ui.getCore().getModel('data').getProperty(spath);
var Model=new sap.ui.Model.json.JSONModel(oitem);
setModel(Model,'item');
附录toDetail(“detailsid”、“show”);
}
我的详细信息页面视图:

var oBCTmpl=new sap.suite.ui.commons.BulletChart({
//id:“子弹”,
大小:sap.suite.ui.commons.InfoTileSize.Auto,
比例:“印度卢比”,
实际:[{
值:“{item>/Amount}”,
颜色:sap.suite.ui.commons.InfoTileValueColor.Error
}],
目标值:2500,
阈值:[
{value:0,color:sap.suite.ui.commons.InfoTileValueColor.Good},
{value:1000,color:sap.suite.ui.commons.InfoTileValueColor.Good},
{value:2000,color:sap.suite.ui.commons.InfoTileValueColor.Good},
{value:3000,color:sap.suite.ui.commons.InfoTileValueColor.Good},
{值:4000,颜色:sap.suite.ui.commons.InfoTileValueColor.Error}
],
showActualValue:true,
showTargetValue:true,
showDeltaValue:true,
showValueMarker:false,
模式:sap.suite.ui.commons.BulletChartMode.Actual
});
输出:

为什么实际值没有显示在图表中?

您在“我的详细信息页面视图”中的数据绑定似乎正常。 你的一些代码丢失了。因此,它必须与您选择的列表实现和/或您从所选项使用的绑定信息/数据有关

建议之一是使用以下各项:

sitem.getBindingContext().getPath();
而不是:

sitem.oBindingContexts.data.sPath;
请参阅SplitApp和sap.m.SelectList的示例(单击左侧的任意项目)。

您在“我的详细信息页面视图”中的数据绑定似乎正常。 你的一些代码丢失了。因此,它必须与您选择的列表实现和/或您从所选项使用的绑定信息/数据有关

建议之一是使用以下各项:

sitem.getBindingContext().getPath();
而不是:

sitem.oBindingContexts.data.sPath;

请参阅SplitApp和sap.m.SelectList的示例(单击左侧的任意项目)。

感谢您的帮助。现在代码正在从母版页中选择项目,但是在选择项目后,它仍然没有在项目符号图中显示数据。也许我误解了什么。每次我点击一个项目(例如,FF,Chrome),它都会改变右边图形的值-500NIR,600NIR,700NIR。谢谢你的帮助。现在代码正在从母版页中选择项目,但是在选择项目后,它仍然没有在项目符号图中显示数据。也许我误解了什么。每次我点击一个项目(例如,FF,Chrome),它都会改变右边图形的值-500NIR,600NIR,700NIR。看见