Misc Chart work

This commit is contained in:
Tom Slater 2019-08-16 16:58:35 +01:00
parent 1070c5de3b
commit 1013a403a3
7 changed files with 17 additions and 49 deletions

View file

@ -121,14 +121,6 @@ export class DashboardCustomerComponent implements OnInit {
// Graph widgets
public widgetList = [
{
type: 'graph',
name: 'total_duration',
duration: '400',
icon: 'icon-diamond',
title: '(test) last 400 days',
dataType: DataType.currency,
},
{
type: 'graph',
name: 'total_last_week',

View file

@ -59,22 +59,9 @@
<div class="card">
<div class="card-block">
<div class="row">
<div class="col-7">
<div class="col-12">
<h4 class="card-title mb-0">Spending by Category</h4>
</div>
<div class="col-sm-5 hidden-sm-down">
<div class="btn-toolbar float-right" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-3" data-toggle="buttons" aria-label="First group">
<select>
<option value="Day">Day</option>
<option value="Week">Week</option>
<option value="Month">Month</option>
<option value="Year">Year</option>
<option value="All Time">All Time</option>
</select>
</div>
</div>
</div>
</div>
<div class="chart-wrapper">
<canvas baseChart class="chart"

View file

@ -22,7 +22,7 @@ export class LeaderboardComponent implements OnInit {
public paginateConfig: PaginationInstance = {
id: 'leadpaginate',
itemsPerPage: 10,
itemsPerPage: 20,
currentPage: 1,
totalItems: 0
};
@ -70,7 +70,7 @@ export class LeaderboardComponent implements OnInit {
console.log(error);
}
);
}
}org
// // dynamically changes the row style based on player's position
// // for instance, top three player and the player him/herself should

View file

@ -12,6 +12,8 @@ import { NgModel } from '@angular/forms';
export class MoreStuffComponent implements OnInit {
@Output() public onClick = new EventEmitter();
@Input() public categories: any;
lineChartBegin: any;
lineChartEnd: any;
bubbleChartBegin: any;
bubbleChartEnd: any;
cached_graph_data: any;
@ -27,7 +29,7 @@ export class MoreStuffComponent implements OnInit {
}
ngOnInit(): void {
this.loadYearSpend(false, ('January 1, 2018'), ('January 1, 2019'));
this.loadYearSpend();
this.loadSupplierBubble(false, ('January 1, 2018'), ('January 1, 2019')); // pass start and end date ranges to this as Date()s
this.loadSupplierHistory();
}
@ -283,8 +285,8 @@ export class MoreStuffComponent implements OnInit {
console.log("end_range input box: " + this.lineChartEnd);
console.log("end_range : " + new Date(this.lineChartEnd));
this.loadSupplierBubble(true, (this.bubbleChartBegin), (this.bubbleChartEnd));
console.log("Bubble chart updating...");
this.loadYearSpend();
console.log("Line chart updating...");
}

View file

@ -82,12 +82,12 @@ export class GraphPanel implements OnInit {
pointHoverBackgroundColor: '#fff'
},
{ // brandSuccess
backgroundColor: 'transparent',
backgroundColor: this.convertHex(this.brandInfo, 10),
borderColor: this.brandSuccess,
pointHoverBackgroundColor: '#fff'
},
{ // brandDanger
backgroundColor: 'transparent',
backgroundColor: this.convertHex(this.brandDanger, 10),
borderColor: this.brandDanger,
pointHoverBackgroundColor: '#fff',
borderWidth: 1,

View file

@ -1,22 +1,9 @@
<div class="card">
<div class="card-block">
<div class="row">
<div class="col-7">
<div class="col-12">
<h4 class="card-title mb-0">All Purchases by Type</h4>
</div>
<div class="col-sm-5 hidden-sm-down">
<div class="btn-toolbar float-right" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-3" data-toggle="buttons" aria-label="First group">
<select>
<option value="Day">Day</option>
<option value="Week">Week</option>
<option value="Month">Month</option>
<option value="Year">Year</option>
<option value="All Time">All Time</option>
</select>
</div>
</div>
</div>
</div>
<div class="chart-wrapper">
<canvas baseChart class="chart"

View file

@ -44,8 +44,8 @@ export class OrgPiePanel implements OnInit {
'blue'
]
},
{ borderWidth: [10]
}
{ borderWidth: [100]
},
];
public doughnutChartLabelsLocal: string[] = [];