Procházet zdrojové kódy

Update style of Tests by Stage chart

Alan Lam před 8 roky
rodič
revize
a063776a7f
1 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. 7 4
      controllers/reports.php

+ 7 - 4
controllers/reports.php

@@ -426,10 +426,10 @@ if($submit) {
 		// Tests by Stage
 
 		$chart = new Chart;
-		$chart->setType("pie");
+		$chart->setType("doughnut");
 		$chart->setTitle("Tests by Stage $date_range_label");
 		$chart->setLabels(["1 - On Entry", "2 - While Browsing", "3 - During Play", "4 - On Exit", "5 - No Challenge"]);
-		$chart->addDataset("Counts", [
+		$chart->addDataset("Tests", [
 			$total_data->stage1Count,
 			$total_data->stage2Count,
 			$total_data->stage3Count,
@@ -442,9 +442,12 @@ if($submit) {
 				"#FBC02D",
 				"#FFAB91",
 				"#F44336",
-			]
+			],
+			"datalabels" => [
+				"backgroundColor" => "rgba(0, 0, 0, 0.75)",
+				"borderRadius" => "2",
+			],
 		]);
-		$chart->setDatalabelSuffixes(" Test");
 		$chart->setPrintSuffixes("");
 		$chart->print = true;
 		$chart->printPercentages = true;