|
|
@@ -78,6 +78,7 @@ if($submit) {
|
|
|
"project_id" => $project_ids,
|
|
|
"status" => Test::STATUS_COMPLETED
|
|
|
]);
|
|
|
+ $test_count = count($tests);
|
|
|
|
|
|
User::load(array_column($tests, "tester_id"));
|
|
|
$locations = Location::load(array_column($tests, "location_id"));
|
|
|
@@ -100,7 +101,6 @@ if($submit) {
|
|
|
$has_regions = !empty($region_data);
|
|
|
$has_area_managers = !empty($area_manager_data);
|
|
|
|
|
|
-
|
|
|
foreach($locations as $location) {
|
|
|
if($has_regions && !$location->region) $locations_missing_region[] = $location;
|
|
|
if($has_area_managers && !$location->area_manager) $locations_missing_area_manager[] = $location;
|
|
|
@@ -496,6 +496,7 @@ if($submit) {
|
|
|
}, $data));
|
|
|
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Pass Rate by $resolution_name");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -514,9 +515,18 @@ if($submit) {
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("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->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => ceil($test_count / 10) * 10]);
|
|
|
+ $chart->addYAxis("linear", "right", "y-axis-2", false, ["min" => 0, "max" => 100]);
|
|
|
|
|
|
+ $chart->addDataset("Performance (%)", $performance, [
|
|
|
+ "border_colours" => "#FFEB3B",
|
|
|
+ "background_colours" => "transparent",
|
|
|
+ "type" => "line",
|
|
|
+ "y_axis_id" => "y-axis-2",
|
|
|
+ "datalabels" => [
|
|
|
+ "display" => false
|
|
|
+ ],
|
|
|
+ ]);
|
|
|
$chart->addDataset("Test Count", $test_counts, [
|
|
|
"background_colours" => "#2196F3",
|
|
|
"type" => "bar",
|
|
|
@@ -532,12 +542,6 @@ if($submit) {
|
|
|
"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)
|
|
|
@@ -571,10 +575,6 @@ if($submit) {
|
|
|
$charts[] = $chart;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
// Tester Genders by Period
|
|
|
$male_counts = array_values(array_map(function($d) {
|
|
|
return $d->maleTesterCount;
|
|
|
@@ -585,6 +585,7 @@ if($submit) {
|
|
|
}, $data));
|
|
|
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => ceil(max(max($male_counts), max($female_counts)) / 10) * 10]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Tester Gender by $resolution_name");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -602,6 +603,7 @@ if($submit) {
|
|
|
}, $data));
|
|
|
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => ceil(max($test_counts) / 10) * 10]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Tests by $resolution_name");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -613,7 +615,6 @@ if($submit) {
|
|
|
$pass_counts = array_column($data, "passCount");
|
|
|
$fail_counts = array_column($data, "failCount");
|
|
|
|
|
|
-
|
|
|
if($has_regions) {
|
|
|
|
|
|
$region_keys = array_keys($region_data);
|
|
|
@@ -632,6 +633,7 @@ if($submit) {
|
|
|
}
|
|
|
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Region Performance");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -642,6 +644,7 @@ if($submit) {
|
|
|
|
|
|
// Region Pass Rate Period
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Region Pass Rate by $resolution_name");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -678,6 +681,7 @@ if($submit) {
|
|
|
}
|
|
|
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Area Manager Performance");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
@@ -688,6 +692,7 @@ if($submit) {
|
|
|
|
|
|
// Area Pass Rate Period
|
|
|
$chart = new Chart;
|
|
|
+ $chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
$chart->setTitle("Area Manager Pass Rate by $resolution_name");
|
|
|
$chart->setLabels($x_data_labels);
|