Explorar el Código

Update horizontal bar charts to vertical

Alan Lam hace 2 años
padre
commit
bae05106d8
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      engine/chart_generator.php

+ 3 - 3
engine/chart_generator.php

@@ -470,16 +470,16 @@ class ChartGenerator {
 		}
 		}
 
 
 		$chart = new Chart();
 		$chart = new Chart();
-		$chart->addYAxis([
+		$chart->addXAxis([
 			"type" => "category",
 			"type" => "category",
 			"stacked" => true,
 			"stacked" => true,
 		]);
 		]);
-		$chart->addXAxis([
+		$chart->addYAxis([
 			"id" => "y-axis-1",
 			"id" => "y-axis-1",
 			"tick_config" => ["min" => 0, "max" => 100],
 			"tick_config" => ["min" => 0, "max" => 100],
 			"stacked" => true,
 			"stacked" => true,
 		]);
 		]);
-		$chart->setType("horizontalBar");
+		$chart->setType("bar");
 		$chart->setTitle($title);
 		$chart->setTitle($title);
 		$chart->setLabels($this->xDataLabels);
 		$chart->setLabels($this->xDataLabels);
 		$chart->addDataset("Pass (%)", $pass_rates, ["background_colours" => self::COLOUR_GREEN]);
 		$chart->addDataset("Pass (%)", $pass_rates, ["background_colours" => self::COLOUR_GREEN]);