mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added internet dependent пÐgraph
This commit is contained in:
@@ -39,6 +39,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataValues: [],
|
dataValues: [],
|
||||||
|
numberGraph: 1,
|
||||||
labels: [" "],
|
labels: [" "],
|
||||||
data: null,
|
data: null,
|
||||||
options: {
|
options: {
|
||||||
@@ -95,10 +96,21 @@ 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 = [1, 1];
|
this.dataValues = [this.numberGraph, this.numberGraph];
|
||||||
}
|
}
|
||||||
else if (this.crashdata.Status === 'InGame') {
|
else if (this.crashdata.Status === 'InGame') {
|
||||||
|
if (this.dataValues.length === 0) {
|
||||||
|
this.dataValues = [this.crashdata.CurrentX, this.crashdata.CurrentX]
|
||||||
nextDataValue = this.crashdata.CurrentX
|
nextDataValue = this.crashdata.CurrentX
|
||||||
|
this.numberGraph = this.crashdata.CurrentX
|
||||||
|
|
||||||
|
this.data = this.chartData
|
||||||
|
this.labels.push("")
|
||||||
|
this.dataValues.push(nextDataValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.numberGraph = this.numberGraph + .01
|
||||||
|
nextDataValue = this.numberGraph
|
||||||
|
|
||||||
this.data = this.chartData;
|
this.data = this.chartData;
|
||||||
this.labels.push("");
|
this.labels.push("");
|
||||||
@@ -106,6 +118,7 @@ export default {
|
|||||||
}
|
}
|
||||||
else if (this.crashdata.Status === 'GameEnd') {
|
else if (this.crashdata.Status === 'GameEnd') {
|
||||||
this.dataValues = []
|
this.dataValues = []
|
||||||
|
this.numberGraph = 1
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('Error game')
|
console.log('Error game')
|
||||||
|
|||||||
Reference in New Issue
Block a user