fix breakeven annotation x offset after adding Jahr 0
This commit is contained in:
4
ui.js
4
ui.js
@@ -119,8 +119,8 @@ const update_chart = (chart, labels, data_buy, data_rent, breakeven_month, years
|
|||||||
chart.options.plugins.annotation.annotations = {
|
chart.options.plugins.annotation.annotations = {
|
||||||
breakeven: {
|
breakeven: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
xMin: be_year - 1, // labels are "Jahr 1" ... "Jahr N", zero-indexed
|
xMin: be_year, // labels are "Jahr 0" ... "Jahr N", zero-indexed
|
||||||
xMax: be_year - 1,
|
xMax: be_year,
|
||||||
borderColor: 'rgba(255,255,255,0.25)',
|
borderColor: 'rgba(255,255,255,0.25)',
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderDash: [5, 4],
|
borderDash: [5, 4],
|
||||||
|
|||||||
Reference in New Issue
Block a user