我正在使用SAPUI5。我有一个sap.ui.table.TreeTable
的XML,我想将JSONModel中的数据动态加载到行中。
在第一行中,我要显示Text
,在第二行中,我要显示BulletMicroChart
。
我如何实现呢?
<t:TreeTable id="treeTable"
rows="{
path: 'nodeModel>/nodeRoot',
parameters: {
arrayNames: [
'children'
]
}
}"
enableSelectAll="false"
expandFirstLevel="true"
selectionMode="Single"
enableColumnReordering="false"
>
<t:columns>
<t:Column>
<t:template>
<Text text="{nodeModel>id}" />
</t:template>
</t:Column>
<t:Column label="Test">
<t:template>
<Text text="{nodeModel>prs1}" />
</t:template>
</t:Column>
</t:columns>
</t:TreeTable>
我现在如何在第二行中添加Bullet Micro Chart以便可视化数字?
我需要将其动态添加到第二行:
<microchart:BulletMicroChart
scale="M"
targetValue="100"
forecastValue="110"
size="Responsive"
>
<microchart:actual>
<microchart:BulletMicroChartData value="120" color="Good" />
</microchart:actual>
<microchart:thresholds>
<microchart:BulletMicroChartData value="0" color="Error" />
<microchart:BulletMicroChartData value="50" color="Critical" />
<microchart:BulletMicroChartData value="150" color="Critical" />
<microchart:BulletMicroChartData value="200" color="Error" />
</microchart:thresholds>
</microchart:BulletMicroChart>
名称|名称1名称2名称3
图表|图表1图表2图表3
我只能在每一列而不是每一行中显示不同的数据。