Limit y to 0..1
This commit is contained in:
parent
1e9c33bc89
commit
fe8c55815d
@ -20,7 +20,7 @@ const element = document.getElementById('chart')
|
|||||||
|
|
||||||
|
|
||||||
function transformPoint({ X, Y }) {
|
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)
|
const no = JSON.parse($("#chart-data").getAttribute("chart-data-p0")).map(transformPoint)
|
||||||
@ -55,8 +55,10 @@ const config = {
|
|||||||
time: { unit: 'month' }
|
time: { unit: 'month' }
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
|
display: true,
|
||||||
|
text: 'price',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 100
|
max: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user