Reformat chart components
This commit is contained in:
parent
a0a4e1ca97
commit
33a0b0840b
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -84,7 +84,6 @@ export default {
|
||||
position: "left",
|
||||
offsetY: 40
|
||||
},
|
||||
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 480,
|
||||
|
Loading…
Reference in New Issue
Block a user