-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPanel.php
executable file
·62 lines (59 loc) · 1.77 KB
/
Panel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace KateMorley\Grid\UI;
use KateMorley\Grid\State\Datum;
/** Outputs a panel. */
class Panel {
/**
* Outputs a panel.
*
* @param string $time The time
* @param Datum $average The average
* @param array $series The series
* @param Axes $axes The axes information
* @param int $timeStep The time step
* @param string $timeFormat The time format
*/
public static function output(
string $time,
Datum $average,
array $series,
Axes $axes,
int $timeStep,
string $timeFormat
): void {
?>
<div>
<?php Status::output($average, $time); ?>
</div>
<div>
<?php Equation::output($average); ?>
</div>
<div>
<?php PieChart::output($average); ?>
</div>
<div>
<?php Tables::output($average); ?>
</div>
<div>
<h3>Price per MWh</h3>
<?php Graph::output($series, $axes, Datum::PRICE, '£', '', $timeStep, $timeFormat, 2); ?>
</div>
<div>
<h3>Emissions per kWh</h3>
<?php Graph::output($series, $axes, Datum::EMISSIONS, '', 'g', $timeStep, $timeFormat, 0); ?>
</div>
<div>
<h3>Demand</h3>
<?php Graph::output($series, $axes, Datum::DEMAND, '', 'GW', $timeStep, $timeFormat, 1); ?>
</div>
<div>
<h3>Generation</h3>
<?php Graph::output($series, $axes, Datum::GENERATION, '', 'GW', $timeStep, $timeFormat, 2); ?>
</div>
<div>
<h3>Transfers</h3>
<?php Graph::output($series, $axes, Datum::TRANSFERS, '', 'GW', $timeStep, $timeFormat, 2); ?>
</div>
<?php
}
}