Reformat chart components

This commit is contained in:
Marcel Schwarz 2020-07-19 22:40:52 +02:00
parent a0a4e1ca97
commit 33a0b0840b
5 changed files with 882 additions and 903 deletions

View File

@ -210,15 +210,8 @@ export default {
for (let index = 0; index < records.length; index++) {
var record = records[index];
for (
let indexAccs = 0;
indexAccs < this.chartOptions.labels.length;
indexAccs++
) {
if (
record.account == this.chartOptions.labels[indexAccs] &&
record.type == "PAID"
) {
for (let indexAccs = 0; indexAccs < this.chartOptions.labels.length; indexAccs++) {
if (record.account == this.chartOptions.labels[indexAccs] && record.type == "PAID") {
this.series[indexAccs] += record.duration;
}
}

View File

@ -220,10 +220,7 @@ export default {
var record = records[index];
for (let indexA = 0; indexA < daysToDisplay; indexA++) {
if (
record.startdate.split("T")[0] ==
this.chartOptions.xaxis.categories[indexA]
) {
if (record.startdate.split("T")[0] == this.chartOptions.xaxis.categories[indexA]) {
if (record.type == "PAID") {
this.series[0].data[indexA] += record.duration;
} else {

View File

@ -173,15 +173,8 @@ export default {
for (let index = 0; index < records.length; index++) {
var record = records[index];
for (
let indexAccs = 0;
indexAccs < this.chartOptions.labels.length;
indexAccs++
) {
if (
record.account == this.chartOptions.labels[indexAccs] &&
record.type == "PAID"
) {
for (let indexAccs = 0; indexAccs < this.chartOptions.labels.length; indexAccs++) {
if (record.account == this.chartOptions.labels[indexAccs] && record.type == "PAID") {
this.series[indexAccs] += record.duration;
}
}

View File

@ -221,10 +221,7 @@ export default {
var record = records[index];
for (let indexA = 0; indexA < daysToDisplay; indexA++) {
if (
record.startdate.split("T")[0] ==
this.chartOptions.xaxis.categories[indexA]
) {
if (record.startdate.split("T")[0] == this.chartOptions.xaxis.categories[indexA]) {
if (record.type == "PAID") {
this.series[0].data[indexA] += record.duration;
} else {

View File

@ -84,7 +84,6 @@ export default {
position: "left",
offsetY: 40
},
responsive: [
{
breakpoint: 480,