fixed icon colours and icons
This commit is contained in:
parent
07af03cb51
commit
6a82c1fe62
2 changed files with 8 additions and 1 deletions
|
@ -147,7 +147,7 @@
|
||||||
<ul class="icons-list">
|
<ul class="icons-list">
|
||||||
<!-- New loop -->
|
<!-- New loop -->
|
||||||
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index">
|
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index">
|
||||||
<i [ngClass]="[ 'icon-question', 'bg-info']"></i>
|
<i [ngClass]="['icon-' + category.icon, getBootstrapColour(i)]"></i>
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<div class="title">{{ category.category || 'N/A' }}</div>
|
<div class="title">{{ category.category || 'N/A' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,6 +25,9 @@ export class DashboardCustomerComponent implements OnInit {
|
||||||
|
|
||||||
disableCategoryButton: boolean = false;
|
disableCategoryButton: boolean = false;
|
||||||
|
|
||||||
|
public bootstrapColours: string[] = ['bg-primary', 'bg-secondary', 'bg-success',
|
||||||
|
'bg-danger', 'bg-warning', 'bg-info'];
|
||||||
|
|
||||||
public chartType = 'doughnut';
|
public chartType = 'doughnut';
|
||||||
public chartLegend = true;
|
public chartLegend = true;
|
||||||
public doughnutChartDataCategory: any[] = [];
|
public doughnutChartDataCategory: any[] = [];
|
||||||
|
@ -205,6 +208,10 @@ export class DashboardCustomerComponent implements OnInit {
|
||||||
this.totalCategoryLimit = 30;
|
this.totalCategoryLimit = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getBootstrapColour(index: number) {
|
||||||
|
return this.bootstrapColours[index % this.bootstrapColours.length];
|
||||||
|
}
|
||||||
|
|
||||||
public convertHex(hex: string, opacity: number) {
|
public convertHex(hex: string, opacity: number) {
|
||||||
hex = hex.replace('#', '');
|
hex = hex.replace('#', '');
|
||||||
const r = parseInt(hex.substring(0, 2), 16);
|
const r = parseInt(hex.substring(0, 2), 16);
|
||||||
|
|
Reference in a new issue