|
|
@@ -438,6 +438,7 @@ if($submit) {
|
|
|
"#F44336",
|
|
|
]
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
|
|
|
@@ -455,6 +456,7 @@ if($submit) {
|
|
|
"#E91E63",
|
|
|
]
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Tester Gender
|
|
|
@@ -471,6 +473,7 @@ if($submit) {
|
|
|
"#E91E63",
|
|
|
]
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Pass / Fail
|
|
|
@@ -487,6 +490,7 @@ if($submit) {
|
|
|
"#F44336",
|
|
|
]
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Pass Rate Period
|
|
|
@@ -503,6 +507,7 @@ if($submit) {
|
|
|
$chart->addDataset("Pass Rate (%)", $performance, [
|
|
|
"background_colours" => "#2196F3"
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes("%");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Monthly Totals by Period
|
|
|
@@ -518,7 +523,7 @@ if($submit) {
|
|
|
$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, [
|
|
|
+ $chart->addDataset("Pass Rate (%)", $performance, [
|
|
|
"border_colours" => "#FFEB3B",
|
|
|
"background_colours" => "transparent",
|
|
|
"type" => "line",
|
|
|
@@ -542,6 +547,7 @@ if($submit) {
|
|
|
"type" => "bar",
|
|
|
"y_axis_id" => "y-axis-1",
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" %", " T", " P", " F");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Point of Challenge (Each Period)
|
|
|
@@ -572,6 +578,7 @@ if($submit) {
|
|
|
"#F44336",
|
|
|
]
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
}
|
|
|
|
|
|
@@ -595,6 +602,7 @@ if($submit) {
|
|
|
$chart->addDataset("Female", $female_counts, [
|
|
|
"background_colours" => "#E91E63"
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" M", " F");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Test Count by Period
|
|
|
@@ -610,6 +618,7 @@ if($submit) {
|
|
|
$chart->addDataset("Tests", $test_counts, [
|
|
|
"background_colours" => "#2196F3"
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes(" Test");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
$pass_counts = array_column($data, "passCount");
|
|
|
@@ -625,7 +634,7 @@ if($submit) {
|
|
|
return "Region $key";
|
|
|
}, $region_keys);
|
|
|
|
|
|
- // Region Performance (Selected Date Range)
|
|
|
+ // Region Pass Rate (Selected Date Range)
|
|
|
$data_values = [];
|
|
|
foreach($region_data as $region => $r_data) {
|
|
|
$total_region_test_count = array_sum(array_column($r_data, "testCount"));
|
|
|
@@ -637,11 +646,12 @@ if($submit) {
|
|
|
$chart = new Chart;
|
|
|
$chart->addYAxis("linear", "left", "y-axis-1", true, ["min" => 0, "max" => 100]);
|
|
|
$chart->setType("bar");
|
|
|
- $chart->setTitle("Region Performance $date_range_label");
|
|
|
+ $chart->setTitle("Region Pass Rate $date_range_label");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
- $chart->addDataset("Performance (%)", $data_values , [
|
|
|
+ $chart->addDataset("Pass Rate (%)", $data_values , [
|
|
|
"background_colours" => "#2196F3"
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes("%");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Region Pass Rate Period
|
|
|
@@ -659,6 +669,7 @@ if($submit) {
|
|
|
}
|
|
|
$chart->addDataset($key_labels[$index], $data_values, ["background_colours" => $colours[$index]]);
|
|
|
}
|
|
|
+ $chart->setDatalabelSuffixes(...array_fill(0, count($keys), "%"));
|
|
|
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
@@ -674,7 +685,7 @@ if($submit) {
|
|
|
return "$key";
|
|
|
}, $area_manager_keys);
|
|
|
|
|
|
- // Area Performance (Selected Date Range)
|
|
|
+ // Area Pass Rate (Selected Date Range)
|
|
|
$data_values = [];
|
|
|
foreach($area_manager_data as $area_manager => $a_data) {
|
|
|
$total_area_manager_test_count = array_sum(array_column($a_data, "testCount"));
|
|
|
@@ -687,11 +698,12 @@ 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 $date_range_label");
|
|
|
+ $chart->setTitle("Area Manager Pass Rate $date_range_label");
|
|
|
$chart->setLabels($x_data_labels);
|
|
|
- $chart->addDataset("Performance (%)", $data_values , [
|
|
|
+ $chart->addDataset("Pass Rate (%)", $data_values , [
|
|
|
"background_colours" => "#2196F3"
|
|
|
]);
|
|
|
+ $chart->setDatalabelSuffixes("%");
|
|
|
$charts[] = $chart;
|
|
|
|
|
|
// Area Pass Rate Period
|
|
|
@@ -709,6 +721,7 @@ if($submit) {
|
|
|
}
|
|
|
$chart->addDataset($key_labels[$index], $data_values, ["background_colours" => $colours[$index]]);
|
|
|
}
|
|
|
+ $chart->setDatalabelSuffixes(...array_fill(0, count($keys), "%"));
|
|
|
|
|
|
$charts[] = $chart;
|
|
|
|