Misc Chart Improvements

Fixed doughnut chart colour loading issues, added WIP dashboard charts, few other misc changes
This commit is contained in:
Tom Slater 2019-08-06 16:51:44 +01:00
parent 0dcf98fed3
commit 3248caed07
10 changed files with 88 additions and 177 deletions

View file

@ -7,8 +7,7 @@
<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">
<input type="radio" name="options" id="option2" checked> Week
<label class="btn btn-outline-secondary active"> Week
</label>
</div>
</div>

View file

@ -9,6 +9,7 @@
<canvas baseChart class="chart"
[data]="doughnutChartDataLocal"
[labels]="doughnutChartLabelsLocal"
[colors]="doughnutChartColors"
[legend]="chartLegend"
[chartType]="chartType"
(chartHover)="chartHovered($event)"

View file

@ -15,6 +15,37 @@ export class OrgPiePanel implements OnInit {
public chartType = 'doughnut';
public chartLegend = true;
public doughnutChartDataLocal: number[] = [];
public doughnutChartColors: any[] = [
{
backgroundColor: [
'red',
'green',
'pink',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
'blue'
]
},
{
borderColor: [
'red',
'green',
'pink',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
'blue'
]
}
];
public doughnutChartLabelsLocal: string[] = [];
constructor(