From fe8c55815db609be0d182eb8c7ee1ba629456218 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 3 Oct 2024 09:23:35 -0500 Subject: [PATCH] Limit y to 0..1 --- public/js/chart.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/chart.js b/public/js/chart.js index c6f7c3b..c9937ad 100644 --- a/public/js/chart.js +++ b/public/js/chart.js @@ -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 } } }