Let’s take an example of a Stacked Bar Chart report.
Step 1 : Create a Custom Report
Report : Generate a bar chart that displays the Count of the test cases by status over priority.
Count Of Test Cases By Status Over Priority
count(1) as "Test Case Count",
COALESCE(testcases.priority, 'No Priority') as "Test Case Priority",
COALESCE(testcases.testCaseStatus, 'No Status') as "Test Case Status"
WHERE testcases.projectID in (`@filter.project`)
GROUP BY testcases.priority, testcases.testCaseStatus
Apply the Filter
By default, it gives you output in tabular format. You can modify the output format by switching to the available chart types from the table. In our case, we will switch it to the Bar Chart.
You can adjust the Columns based on the requirement to Label, Data and Cross Tab sections.
Label always holds a single Test entity field with any value.
Multiple Test entity field on Data creates a stacked chart; Data always contain fields with numeric values.
Cross Tab field will help to create a Group Stacked chart.
Step 2 : Modify Chart Colors
The Chart Settings icon is provided with each type of chart that allows you to customize the appearance of the graph. You can customize the chart colors of your choice based on legends used in the chart along with a feature to enable/disable the legends as required; here’s how you can do it.
Click on the cog icon on the graph. It opens the Chart Settings panel.
You can customize the color of the legends as per your requirement.
You can show/hide the legends on the graph by enabling/disabling the Visible settings.
You can also show/hide the axis labels on the legends by enabling/disabling the Visible settings.
Click on the “Reset All” option under the Colors section to revert the changes (it will reset the colors to system-defined colors).
Note: Colors of Execution Status used as legends appear as they set under Customization > Execution Status. You can not modify the colors from chart settings as the option remains grayed out for execution status (refer to the attached screenshot).