|
|
@@ -58,6 +58,8 @@ $colours = [
|
|
|
"#9e9e9e",
|
|
|
];
|
|
|
|
|
|
+$project_ids = [];
|
|
|
+
|
|
|
$submit = http::value("submit");
|
|
|
if($submit) {
|
|
|
try {
|
|
|
@@ -472,6 +474,42 @@ if($submit) {
|
|
|
]);
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
+ // Monthly Totals by Period
|
|
|
+
|
|
|
+ $test_counts = array_column($data, "testCount");
|
|
|
+ $pass_counts = array_column($data, "passCount");
|
|
|
+ $fail_counts = array_column($data, "failCount");
|
|
|
+
|
|
|
+ $chart = new Chart;
|
|
|
+ $chart->setType("bar");
|
|
|
+ $chart->setTitle("Monthly Totals by $resolution_name");
|
|
|
+ $chart->setLabels($x_data_labels);
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1");
|
|
|
+ $chart->addYAxis("linear", "right", "y-axis-2", false);
|
|
|
+
|
|
|
+ $chart->addDataset("Test Count", $test_counts, [
|
|
|
+ "background_colours" => "#2196F3",
|
|
|
+ "type" => "bar",
|
|
|
+ "y_axis_id" => "y-axis-1",
|
|
|
+ ]);
|
|
|
+ $chart->addDataset("Pass", $pass_counts, [
|
|
|
+ "background_colours" => "#4CAF50",
|
|
|
+ "type" => "bar",
|
|
|
+ "y_axis_id" => "y-axis-1",
|
|
|
+ ]);
|
|
|
+ $chart->addDataset("Fail", $fail_counts, [
|
|
|
+ "background_colours" => "#F44336",
|
|
|
+ "type" => "bar",
|
|
|
+ "y_axis_id" => "y-axis-1",
|
|
|
+ ]);
|
|
|
+ $chart->addDataset("Performance (%)", $performance, [
|
|
|
+ "border_colours" => "#FFEB3B",
|
|
|
+ "background_colours" => "transparent",
|
|
|
+ "type" => "line",
|
|
|
+ "y_axis_id" => "y-axis-2",
|
|
|
+ ]);
|
|
|
+ $charts[] = $chart;
|
|
|
+
|
|
|
// Point of Challenge (Each Period)
|
|
|
|
|
|
foreach($keys as $index => $key) {
|