График теперь начинается не от ноля

This commit is contained in:
Данил 2024-08-07 00:09:00 +03:00
parent 5b82defd78
commit f63730e87e

View file

@ -33,10 +33,21 @@ async function gen_chart(from_currency, conv_currency, start_date, end_date) {
const chart = ChartJSImage().chart({ const chart = ChartJSImage().chart({
type: 'line', type: 'line',
options: { options: {
title: { title: {
display: true, display: true,
text: `${from_currency} / ${conv_currency}`, text: `${from_currency} / ${conv_currency}`,
}, },
scales: [
{
yAxes: [
{
ticks: {
beginAtZero: false,
}
}
]
}
]
}, },
data: { data: {
labels: date, labels: date,