feat(dca): add chart zoom navigation

This commit is contained in:
Herculino Trotta
2026-08-15 15:10:10 -03:00
parent 1c4f23a69e
commit 33f0904a0f
4 changed files with 57 additions and 1 deletions
@@ -331,6 +331,8 @@
},
scales: {
x: {
min: Math.max(0, priceData.labels.length - 20),
max: Math.max(0, priceData.labels.length - 1),
grid: {
display: false
},
@@ -369,6 +371,29 @@
}
},
plugins: {
zoom: {
limits: {
x: {
min: 0,
max: Math.max(0, priceData.labels.length - 1),
minRange: 5
}
},
pan: {
enabled: true,
mode: 'x'
},
zoom: {
wheel: {
enabled: true,
modifierKey: 'ctrl'
},
pinch: {
enabled: true
},
mode: 'x'
}
},
legend: {
position: 'top'
},