Limit y to 0..1

This commit is contained in:
ekzyis 2024-10-03 09:23:35 -05:00
parent 1e9c33bc89
commit fe8c55815d
1 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,7 @@ const element = document.getElementById('chart')
function transformPoint({ X, Y }) {
return { x: new Date(X), y: Y * 100 }
return { x: new Date(X), y: Y }
}
const no = JSON.parse($("#chart-data").getAttribute("chart-data-p0")).map(transformPoint)
@ -55,8 +55,10 @@ const config = {
time: { unit: 'month' }
},
y: {
display: true,
text: 'price',
min: 0,
max: 100
max: 1
}
}
}