1

I have been trying to create pie chart using rally sdk with the following piece of code:

    <!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> 

This isn't working. it says "no data" in place of the pie chart. But if I remove the following line...

query: 'TestSet.Name="Alpha"'

...then i see the piechart but that's for all testcaseresults in the project. I need to create pie chart for testcaseresults from a specific testset only. How do I accomplish that? Thank you.

hariszhr
  • 409
  • 2
  • 14

1 Answers1

1

If you're using the example from the developer portal as a starter it's using an old version of the SDK (1.23) where the query attribute was not supported. I was able to get your code to work correctly once I upgraded to the latest (1.32). I'll get that example updated so nobody else runs into this same problem.

Kyle Morse
  • 8,390
  • 2
  • 15
  • 16