Fix broken chart

This commit is contained in:
James Cole 2023-03-01 06:40:58 +01:00
parent 2295110cf1
commit fb0a100a7f
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
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) }}';

View File

@ -172,8 +172,8 @@
var lineColor = 'red';
var lineTextColor = '#000';
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
var lineColor = '#a00';
var lineTextColor = '#bec5cb';
lineColor = '#a00';
lineTextColor = '#bec5cb';
}
var billCount = {{ billCount }};
var accountFrontpageUrl = '{{ route('chart.account.frontpage') }}';