Fix broken chart

This commit is contained in:
James Cole
2023-03-01 06:40:58 +01:00
parent 2295110cf1
commit fb0a100a7f
2 changed files with 8 additions and 2 deletions

View File

@@ -191,6 +191,12 @@
var expenseCategoryUrl = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var expenseBudgetUrl = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var drawVerticalLine = '';
var lineColor = 'red';
var lineTextColor = '#000';
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
lineColor = '#a00';
lineTextColor = '#bec5cb';
}
{# render vertical line with text "today" #}
{% if start.lte(today) and end.gte(today) %}
drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}';