fix breakeven annotation x offset after adding Jahr 0

This commit is contained in:
Johannes
2026-03-20 02:56:18 +01:00
parent f10845cb77
commit aab89d83e9

4
ui.js
View File

@@ -119,8 +119,8 @@ const update_chart = (chart, labels, data_buy, data_rent, breakeven_month, years
chart.options.plugins.annotation.annotations = {
breakeven: {
type: 'line',
xMin: be_year - 1, // labels are "Jahr 1" ... "Jahr N", zero-indexed
xMax: be_year - 1,
xMin: be_year, // labels are "Jahr 0" ... "Jahr N", zero-indexed
xMax: be_year,
borderColor: 'rgba(255,255,255,0.25)',
borderWidth: 1,
borderDash: [5, 4],