empty start on graph

This commit is contained in:
Kasper Rynning-Tønnesen
2020-01-24 16:30:49 +01:00
parent 74e34d291b
commit b39dea5705

View File

@@ -19,34 +19,34 @@ export default {
_response = await fetch("/api/purchase/statistics"); _response = await fetch("/api/purchase/statistics");
} }
let response = await _response.json(); let response = await _response.json();
let labels = []; let labels = [""];
let blue = { let blue = {
label: "Blå", label: "Blå",
borderColor: "#57d2fb", borderColor: "#57d2fb",
backgroundColor: "#d4f2fe", backgroundColor: "#d4f2fe",
borderWidth: 2, borderWidth: 2,
data: [] data: [0]
}; };
let yellow = { let yellow = {
label: "Gul", label: "Gul",
borderColor: "#ffde5d", borderColor: "#ffde5d",
backgroundColor: "#fff6d6", backgroundColor: "#fff6d6",
borderWidth: 2, borderWidth: 2,
data: [] data: [0]
}; };
let red = { let red = {
label: "Rød", label: "Rød",
borderColor: "#ef5878", borderColor: "#ef5878",
backgroundColor: "#fbd7de", backgroundColor: "#fbd7de",
borderWidth: 2, borderWidth: 2,
data: [] data: [0]
}; };
let green = { let green = {
label: "Grønn", label: "Grønn",
borderColor: "#10e783", borderColor: "#10e783",
backgroundColor: "#c8f9df", backgroundColor: "#c8f9df",
borderWidth: 2, borderWidth: 2,
data: [] data: [0]
}; };
let highestNumber = 0; let highestNumber = 0;
@@ -87,7 +87,7 @@ export default {
title: { title: {
display: true, display: true,
text: "Antall kjøpt", text: "Antall kjøpt",
fontSize: 20, fontSize: 20
}, },
legend: { legend: {
display: true, display: true,