mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-22 18:30:14 +01:00
feat(charts): integrate js theme with d3
This commit is contained in:
parent
746d18680e
commit
672615b710
8 changed files with 100 additions and 24 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { NgaThemeService } from '@akveo/nga-theme';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-d3-advanced-pie',
|
||||
|
|
@ -26,7 +27,18 @@ export class D3AdvancedPieComponent {
|
|||
},
|
||||
];
|
||||
view: any[] = [700, 400];
|
||||
colorScheme = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'],
|
||||
};
|
||||
colorScheme: any;
|
||||
|
||||
constructor(private theme: NgaThemeService) {
|
||||
this.theme.getJsTheme().subscribe(config => {
|
||||
this.colorScheme = {
|
||||
domain: [
|
||||
config.d3AdvancedPieColor1,
|
||||
config.d3AdvancedPieColor2,
|
||||
config.d3AdvancedPieColor3,
|
||||
config.d3AdvancedPieColor4,
|
||||
],
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue