| 1 |
{# Sales-over-time bar chart, in the markup `makeover_webview::chart` emits, so |
| 2 |
one set of rules in layout.css draws this and the described chart alike. |
| 3 |
Expects `chart` in the parent context. |
| 4 |
|
| 5 |
Both numbers reach the markup as themselves and the stylesheet divides them. |
| 6 |
That is what the described chart needs to compile, and this copy follows it |
| 7 |
so the two cannot drift into two charts. #} |
| 8 |
<div class="chart" style="--most: {{ chart.most }}" role="img" aria-label="revenue over time"> |
| 9 |
<div class="chart-bars"> |
| 10 |
{% for bar in chart.bars %} |
| 11 |
<div class="chart-bar-col" data-tooltip="{{ bar.value }} / {{ bar.count }} sale{% if bar.count != 1 %}s{% endif %}"> |
| 12 |
<div class="chart-bar" style="--value: {{ bar.cents }}"></div> |
| 13 |
<div class="chart-bar-label">{{ bar.label }}</div> |
| 14 |
</div> |
| 15 |
{% endfor %} |
| 16 |
</div> |
| 17 |
</div> |
| 18 |
|