我一直在尝试使用带有以下代码的 rally sdk 创建饼图:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Pie Chart Example</title>
<meta name="Name" content="Component Example: Pie Chart" />
<meta name="Version" content="1.32" />
<meta name="Vendor" content="Rally Software" />
<script type="text/javascript" src="/apps/1.32/sdk.js"></script>
<script type="text/javascript">
function showPie() {
var rallyDataSource = new rally.sdk.data.RallyDataSource('__WORKSPACE_OID__',
'__PROJECT_OID__',
'__PROJECT_SCOPING_UP__',
'__PROJECT_SCOPING_DOWN__');
var pieConfig = {
type : "TestCaseResult",
attribute: "Verdict",
query: 'TestSet.Name="Alpha"'
};
var pieChart = new rally.sdk.ui.PieChart(pieConfig, rallyDataSource);
pieChart.display("pieChartDiv");
}
rally.addOnLoad(showPie);
</script>
</head>
<body>
<div id="pieChartDiv" style="height:225px; width:250px"></div>
</body>
</html>
这是行不通的。它说“没有数据”代替饼图。但是,如果我删除以下行...
query: 'TestSet.Name="Alpha"'
...然后我看到饼图,但这是项目中的所有测试用例结果。我只需要为来自特定测试集的测试用例结果创建饼图。我该如何做到这一点?谢谢你。