fix(demo): refactor js theme using

This commit is contained in:
KostyaDanovsky 2017-08-01 15:42:06 +03:00
parent 672615b710
commit b772882cd6
28 changed files with 561 additions and 492 deletions

View file

@ -32,12 +32,7 @@ export class D3AdvancedPieComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [
config.d3AdvancedPieColor1,
config.d3AdvancedPieColor2,
config.d3AdvancedPieColor3,
config.d3AdvancedPieColor4,
],
domain: (<any>config.variables.d3).advancedPie,
};
});
}

View file

@ -77,12 +77,7 @@ export class D3AreaStackComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [
config.d3AreaStackColor1,
config.d3AreaStackColor2,
config.d3AreaStackColor3,
config.d3AreaStackColor4,
],
domain: (<any>config.variables.d3).areaStack,
};
});
}

View file

@ -47,7 +47,7 @@ export class D3BarComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [config.d3BarColor1, config.d3BarColor2, config.d3BarColor3, config.d3BarColor4],
domain: (<any>config.variables.d3).bar,
};
});
}

View file

@ -74,7 +74,7 @@ export class D3LineComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [config.d3LineColor1, config.d3LineColor2, config.d3LineColor3, config.d3LineColor4],
domain: (<any>config.variables.d3).line,
};
});
}

View file

@ -42,7 +42,7 @@ export class D3PieComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [config.d3PieColor1, config.d3PieColor2, config.d3PieColor3, config.d3PieColor4],
domain: (<any>config.variables.d3).pie,
};
});
}

View file

@ -87,7 +87,7 @@ export class D3PolarComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
this.colorScheme = {
domain: [config.d3PolarColor1, config.d3PolarColor2, config.d3PolarColor3, config.d3PolarColor4],
domain: (<any>config.variables.d3).polar,
};
});
}