Chart Labels and clean up

Added axis labels and cleaned up charts a little.
This commit is contained in:
Tom Slater 2019-08-07 16:21:40 +01:00
parent 3248caed07
commit 7ee0b64351
7 changed files with 96 additions and 32 deletions

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

@ -16,6 +16,19 @@ export class PiePanel implements OnInit {
public chartLegend = true;
public doughnutChartDataLocal: number[] = [];
public doughnutChartLabelsLocal: string[] = [];
public doughnutChartColors: any[] = [{ backgroundColor: [
'red',
'green',
'blue',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
'pink'
]
}];
constructor(
private api: ApiService,