mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added info in graph crash
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="crashdata.Status === 'WaitingForPlayers'"><h2>Игра не началась</h2></div>
|
<div v-if="crashdata.Status === 'WaitingForPlayers'"><h2>{{ crashdata.WaitingTime ? crashdata.WaitingTime.toFixed(1) : '' }}</h2></div>
|
||||||
<LineChart
|
<LineChart
|
||||||
:chart-data="data"
|
:chart-data="data"
|
||||||
:options="options"
|
:options="options"
|
||||||
v-else
|
v-else
|
||||||
/>
|
/>
|
||||||
|
<h2>{{ crashdata.CurrentX ? crashdata.CurrentX.toFixed(2) : '' }}</h2>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -37,7 +38,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataValues: [],
|
dataValues: [0,],
|
||||||
labels: [""],
|
labels: [""],
|
||||||
data: null,
|
data: null,
|
||||||
options: {
|
options: {
|
||||||
@@ -87,7 +88,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];
|
this.dataValues = [0, 0];
|
||||||
}
|
}
|
||||||
else if (this.crashdata.Status === 'InGame') {
|
else if (this.crashdata.Status === 'InGame') {
|
||||||
nextDataValue = this.crashdata.CurrentX
|
nextDataValue = this.crashdata.CurrentX
|
||||||
|
|||||||
Reference in New Issue
Block a user