|
@@ -850,6 +850,7 @@ class ChartGenerator {
|
|
|
$chart->setTitle("{$entity_name} Pass Rate by {$this->resolutionName}");
|
|
$chart->setTitle("{$entity_name} Pass Rate by {$this->resolutionName}");
|
|
|
$chart->setLabels($x_labels);
|
|
$chart->setLabels($x_labels);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
foreach($this->periodKeys as $index => $key) {
|
|
foreach($this->periodKeys as $index => $key) {
|
|
|
$data_values = [];
|
|
$data_values = [];
|
|
|
foreach($entity_keys as $entity_key) {
|
|
foreach($entity_keys as $entity_key) {
|
|
@@ -857,7 +858,7 @@ class ChartGenerator {
|
|
|
$data_values[] = ($datum->testCount === 0) ? 0 : round(($datum->passCount * 100) / $datum->testCount);
|
|
$data_values[] = ($datum->testCount === 0) ? 0 : round(($datum->passCount * 100) / $datum->testCount);
|
|
|
}
|
|
}
|
|
|
$chart->addDataset($this->periodLabels[$index], $data_values, [
|
|
$chart->addDataset($this->periodLabels[$index], $data_values, [
|
|
|
- "background_colours" => Chart::COLOURS[$index],
|
|
|
|
|
|
|
+ "background_colours" => Chart::getColourByIndex($index),
|
|
|
"datalabels" => [
|
|
"datalabels" => [
|
|
|
"display" => false
|
|
"display" => false
|
|
|
]
|
|
]
|