我是新手。有没有办法在一个 html 页面上显示多个标准报告?我为每个图表创建了发布淹没组件,并将这些图表显示在带有 html 表格单元格的 div 元素中。我希望能够将这些图表显示为集会之外的一页。图表单独工作,但是当我将它们组合成一个 html 页面时,只有 1 个工作。
允许用户输入一个版本,并且该版本的 objectid 被传递给图表显示函数。请参阅下面的代码片段:
function releaseSelected2(dropdown,eventArgs) {
var selectedItem=eventArgs.item;
var selectedValue = eventArgs.value;
var releaseObjids2 = new Array();
releaseObjids2[1]=selectedItem.ObjectID;
displayChart2(releaseObjids2[1]);
} //end event listener for chart1
var ddown2=document.getElementById("ddown2");
var config2 = { label: "Select a release " };
var releaseDropdown = new rally.sdk.ui.ReleaseDropdown(config2,rallyDataSource);
releaseDropdown.display(ddown2,releaseSelected2);
function releaseSelected(dropdown,eventArgs) {
var selectedItem=eventArgs.item;
var selectedValue = eventArgs.value;
var releaseObjids = new Array();
releaseObjids[1]=selectedItem.ObjectID;
displayChart1(releaseObjids[1]);
}
var ddown1=document.getElementById("ddown1");
var config = { label: "Select a release " };
var releaseDropdown = new rally.sdk.ui.ReleaseDropdown(config,rallyDataSource);
releaseDropdown.display(ddown1,releaseSelected);
function displayChart1(release) {
var config = {
report: rally.sdk.ui.StandardReport.ReleaseDefectTrend,
title: 'Blacklight: Release defect trend',
subtitle: 'subtitle placeholder',
width : 550,
height: 500,
releases: release
};
var report = new rally.sdk.ui.StandardReport(config);
var div1=document.getElementById("div1");
report.display(div1);
}
function displayChart2(release2) {
var config2 = {
report: rally.sdk.ui.StandardReport.ReleaseBurnup,
title: 'Blacklight: Release burnup',
subtitle: 'subtitle placeholder',
width : 550,
height:500,
release: release2
};
var report2 = new rally.sdk.ui.StandardReport(config2);
var div2=document.getElementById("div2");
report2.display(div2);
}
//html
.
.
<table border="1">
<tr>
<th> </th>
<th> </th>
</tr>
<tr>
<th id="ddown1"> </th>
<th id="ddown2"> </th>
</tr>
<tr>
<td>
<div id="div1"></div>
</td>
<td>
<div id="div2"></div>
</td>
</tr>
</table>
.
.
.