Creating stacked area chart in wiki page

Posts: 1
Joined: Thu May 18, 2017 9:25 am

Creating stacked area chart in wiki page

Postby Dominik_B » Thu May 18, 2017 12:51 pm

Hi everybody,

my task is to create charts and metrics for reports in Polarion. I want to create a chart which shows all epics divided by status:
Polarion Example.png
Polarion Example.png (17.09 KiB) Viewed 435 times

Explanation of example: Look at the 26.02.2017. At this point there exist approximately 360 epics. Approximately 160 are in status "accepted", 90 are in status "ready for review", 10 are in status "to clarify" and so on.

In the Wiki Highcharts Documentation I found the following for stacked area charts:
#highchartStart("Stacked area" "area" 400 300)
#addHighchartXYDataSet("Apple" "10,10 : 12,20 : 16,30")
#addHighchartXYDataSet("Orange" "10,12 : 12,18 : 16,33")
#addHighchartXYDataSet("Kiwi" "10,14 : 12,22 : 16,27")
#addHighchartAdditionalOptions("options.plotOptions = {area:{stacking: 'normal'}};")

My problem is, that this code uses defined values and not the values from Polarion. Another example given in the documentation is the following:
#highchartStart("Defects" "" 400 400)
#set($numberOfBlocker = $trackerService.dataService.getInstancesCount("WorkItem", "severity:blocker"))
#set($numberOfCritical = $trackerService.dataService.getInstancesCount("WorkItem", "severity:critical"))
#set($numberOfMajor = $trackerService.dataService.getInstancesCount("WorkItem", "severity:major"))
#addHighchartPieDataSet("Count" "'Critical',$numberOfCritical : 'Blocker',$numberOfBlocker : 'Major',$numberOfMajor")

This works with the values of Polarion, but not with the informations about work items' status. I tried to change the code to:
#highchartStart("Epics" "" 400 400)
#set($numberOfProposed = $trackerService.dataService.getInstancesCount("WorkItem=programepic", "status:proposed"))
#set($numberOfToClarify = $trackerService.dataService.getInstancesCount("WorkItem=programepic", "severity:critical"))
#addHighchartPieDataSet("Count" "'To Clarify',$numberOfToClarify : 'Proposed',$numberOfProposed")

The result is:
Pie chart.png
Pie chart.png (4.14 KiB) Viewed 435 times

That didn't work. Instead of a pie chart I saw a line with the both descriptions "proposed" and "to clarify". When I move the cursor over the two descriptions a message is shown, that 0 work items are counted.

Can anybody give some advice to me how I have to change the code? I already read the polarion guides and sdk documentary, but that didn't help me.

Best regards,

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests