@@ -58,7 +58,9 @@ |
||
58 | 58 | |
59 | 59 | // An aggregate function for arrays representing fractions with the same denominator. |
60 | 60 | $agg = function ($a, $b) { |
61 | - if ($a === null && $b === null) return null; |
|
61 | + if ($a === null && $b === null) { |
|
62 | + return null; |
|
63 | + } |
|
62 | 64 | return [$a[0] + $b[0], $b[1]]; |
63 | 65 | }; |
64 | 66 |
@@ -2,8 +2,11 @@ |
||
2 | 2 | <?php foreach ($vs as $k => $v) : ?> |
3 | 3 | <?php if (count($v) === 2 ): // Isolated date.?> |
4 | 4 | <div class='bar bar-date bar<?= $k; ?>' style='left:<?= $v[0] ?>%;' data-title='<?= $v[1] ?>'></div> |
5 | - <?php else: ?> |
|
6 | - <div class='bar bar-intv bar<?= $k; ?>' |
|
5 | + <?php else { |
|
6 | + : ?> |
|
7 | + <div class='bar bar-intv bar<?= $k; |
|
8 | +} |
|
9 | +?>' |
|
7 | 10 | style='left:<?= $v[0] ?>%;right:<?= $v[1] ?>%;background-color:<?= $v[2] ?>' |
8 | 11 | data-title="<?= $v[3] . ' ➔ ' . $v[4] . (isset($v[5]) ? ' : ' . $v[5] : '') ?>"> |
9 | 12 | </div> |