fixed graph crash

This commit is contained in:
Kostya
2024-02-04 17:30:38 +03:00
parent 886a62e208
commit a4fa62c06b

View File

@@ -38,7 +38,7 @@ export default {
}, },
data() { data() {
return { return {
dataValues: [0,], dataValues: [],
labels: [" "], labels: [" "],
data: null, data: null,
options: { options: {
@@ -48,9 +48,6 @@ export default {
}, },
}, },
scales: { scales: {
y: {
beginAtZero: true, // Устанавливаем начало оси Y с нуля
},
}, },
animation: false, // Отключаем анимацию animation: false, // Отключаем анимацию
}, },
@@ -88,7 +85,7 @@ export default {
if (this.crashdata.Status === 'WaitingForPlayers') { if (this.crashdata.Status === 'WaitingForPlayers') {
this.data = this.chartData; this.data = this.chartData;
this.labels = [""]; this.labels = [""];
this.dataValues = [0, 0]; this.dataValues = [1, 1];
} }
else if (this.crashdata.Status === 'InGame') { else if (this.crashdata.Status === 'InGame') {
nextDataValue = this.crashdata.CurrentX nextDataValue = this.crashdata.CurrentX