Merge pull request #7092 from firefly-iii/fix-broken-chart

Fix broken chart
This commit is contained in:
James Cole 2023-03-01 06:41:16 +01:00 committed by GitHub
commit 21ba311ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 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 expenseBudgetUrl = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
var drawVerticalLine = ''; 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" #} {# render vertical line with text "today" #}
{% if start.lte(today) and end.gte(today) %} {% if start.lte(today) and end.gte(today) %}
drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}'; drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}';

View File

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