PluginProbe
Disk Usage Insights / trunk
Disk Usage Insights vtrunk
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
← All changes | src/Frontend/Table.php +11 -0 1.6trunk View file →
@@ -7,8 +7,9 @@
7 7 private /** @var array */ $columnNames = [];
8 8 private /** @var array */ $columnCss = [];
9 9 private /** @var array */ $percentBar = null; // [$colDisplay, $colSource]
10 10 private /** @var array */ $data = [];
11 + private /** @var array */ $vbarChart = [];
11 12 private ?Pagination $pagination = null;
12 13
13 14 public function __construct(string $headline, array $columnNames = [], array $columnCss = [])
14 15 {
@@ -34,8 +35,18 @@
34 35 }
35 36
36 37 public function withPercentBar(int $colDisplay, int $colSource): self {
37 38 $this->percentBar = [$colDisplay, $colSource];
39 +
40 + return $this;
41 + }
42 +
43 + public function withVbarChart(int $colSource): self {
44 + // vbar chart
45 + $this->vbarChart = [];
46 + foreach ($this->data as $row) {
47 + $this->vbarChart[] = floatval($row[$colSource]);
48 + }
38 49
39 50 return $this;
40 51 }
41 52