mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-19 00:40:12 +01:00
style(charts): refactoring components hierarchy
This commit is contained in:
parent
2d16bad88f
commit
cf9ccf1850
25 changed files with 179 additions and 44 deletions
54
src/app/pages/charts/chartjs/chartjs-pie.component.ts
Normal file
54
src/app/pages/charts/chartjs/chartjs-pie.component.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-chart-js-pie',
|
||||
styles: [
|
||||
`
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
`,
|
||||
],
|
||||
template: `
|
||||
<canvas baseChart
|
||||
[data]="pieChartData"
|
||||
[labels]="pieChartLabels"
|
||||
[options]="pieChartOptions"
|
||||
[chartType]="pieChartType"></canvas>
|
||||
`,
|
||||
})
|
||||
export class ChartjsPieComponent {
|
||||
|
||||
pieChartType: string = 'pie';
|
||||
pieChartLabels: string[] = ['Download Sales', 'In-Store Sales', 'Mail Sales'];
|
||||
pieChartData: number[] = [300, 500, 100];
|
||||
pieChartOptions: any = {
|
||||
responsive: true,
|
||||
scales: {
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
display: true,
|
||||
color: 'rgba(148,159,177,1)',
|
||||
},
|
||||
ticks: {
|
||||
fontColor: 'white',
|
||||
},
|
||||
}],
|
||||
yAxes: [{
|
||||
gridLines: {
|
||||
display: true,
|
||||
color: 'rgba(148,159,177,1)',
|
||||
},
|
||||
ticks: {
|
||||
fontColor: 'white',
|
||||
},
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
labels: {
|
||||
fontColor: 'white',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue