Added time filter options + Chart Labels

Cleaned up graphs that aren't relevant to this particular page, added chart labels and a WIP time filter option
This commit is contained in:
Tom Slater 2019-08-09 10:21:40 +01:00
parent 7ee0b64351
commit c206a394d2
9 changed files with 89 additions and 112 deletions

View file

@ -7,11 +7,16 @@
<div class="col-sm-7 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">
<label class="btn btn-outline-secondary active"> Week
</label>
<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><!--/.col-->
</div>
</div><!--/.row-->
<div class="chart-wrapper" style="height:300px;margin-top:40px;">
<canvas baseChart class="chart"

View file

@ -2,7 +2,7 @@
<div class="card-block">
<div class="row">
<div class="col-12">
<h4 class="card-title mb-0">All Purchases</h4>
<h4 class="card-title mb-0">All Purchases by Type</h4>
</div>
</div>
<div class="chart-wrapper">

View file

@ -12,7 +12,7 @@ import { ChartData } from '../_interfaces/chart-data';
export class OrgPiePanel implements OnInit {
public chartType = 'doughnut';
public chartType = 'pie';
public chartLegend = true;
public doughnutChartDataLocal: number[] = [];
public doughnutChartColors: any[] = [

View file

@ -2,7 +2,7 @@
<div class="card-block">
<div class="row">
<div class="col-12">
<h4 class="card-title mb-0">All Purchases</h4>
<h4 class="card-title mb-0">All Purchases by Category</h4>
</div>
</div>
<div class="chart-wrapper">

View file

@ -12,11 +12,12 @@ import { ChartData } from '../_interfaces/chart-data';
export class PiePanel implements OnInit {
public chartType = 'doughnut';
public chartType = 'pie';
public chartLegend = true;
public doughnutChartDataLocal: number[] = [];
public doughnutChartLabelsLocal: string[] = [];
public doughnutChartColors: any[] = [{ backgroundColor: [
public doughnutChartColors: any[] = [
{ backgroundColor: [
'red',
'green',
'blue',
@ -28,7 +29,21 @@ export class PiePanel implements OnInit {
'orange',
'pink'
]
}];
},
{ borderColor:[
'red',
'green',
'blue',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
'pink'
]
}
];
constructor(
private api: ApiService,