From a4fa62c06ba41365a0a83b62aafd9c538c1fe000 Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 4 Feb 2024 17:30:38 +0300 Subject: [PATCH] fixed graph crash --- .../components/games-components/CrashGraphComponent.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/luckydiamond/src/components/games-components/CrashGraphComponent.vue b/luckydiamond/src/components/games-components/CrashGraphComponent.vue index 2ea937b..b535dfb 100644 --- a/luckydiamond/src/components/games-components/CrashGraphComponent.vue +++ b/luckydiamond/src/components/games-components/CrashGraphComponent.vue @@ -38,8 +38,8 @@ export default { }, data() { return { - dataValues: [0,], - labels: [""], + dataValues: [], + labels: [" "], data: null, options: { plugins: { @@ -48,9 +48,6 @@ export default { }, }, scales: { - y: { - beginAtZero: true, // Устанавливаем начало оси Y с нуля - }, }, animation: false, // Отключаем анимацию }, @@ -88,7 +85,7 @@ export default { if (this.crashdata.Status === 'WaitingForPlayers') { this.data = this.chartData; this.labels = [""]; - this.dataValues = [0, 0]; + this.dataValues = [1, 1]; } else if (this.crashdata.Status === 'InGame') { nextDataValue = this.crashdata.CurrentX