From d76142883623940acbc1743cf60c14b186345a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:39:33 +0300 Subject: [PATCH 1/6] fix blockviewer --- .../blockviewer/blockviewer.component.ts | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/app/components/blockviewer/blockviewer.component.ts b/src/app/components/blockviewer/blockviewer.component.ts index 94f11d1..e06d1b7 100644 --- a/src/app/components/blockviewer/blockviewer.component.ts +++ b/src/app/components/blockviewer/blockviewer.component.ts @@ -18,19 +18,18 @@ enum BlockView {
Preview - - + Code - +
-
+
{{code}}
@@ -49,7 +48,7 @@ export class BlockViewer { @Input() previewStyle: string; - @Input() free: boolean = false; + @Input() free: boolean = true; @Input() new: boolean = false; @@ -58,23 +57,14 @@ export class BlockViewer { blockView: BlockView = BlockView.PREVIEW; activateView(event: Event, blockView: BlockView) { - if (!this.codeDisabled) { - this.blockView = blockView; - } - - event.preventDefault(); + + this.blockView = blockView; + event.preventDefault(); } async copyCode(event: Event) { - if (!this.codeDisabled) { - await navigator.clipboard.writeText(this.code); - } - - event.preventDefault(); - } - - get codeDisabled() { - return this.free ? false : (environment ? environment.production: false); + await navigator.clipboard.writeText(this.code); + event.preventDefault(); } } From dddd67d0b94892d654f90a89ab14d6d725e16d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:44:34 +0300 Subject: [PATCH 2/6] fix overlay menu click listener --- src/app/app.main.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/app.main.component.ts b/src/app/app.main.component.ts index 31359eb..024abef 100644 --- a/src/app/app.main.component.ts +++ b/src/app/app.main.component.ts @@ -69,6 +69,9 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { if (!this.menuClick && this.isOverlay()) { this.menuInactiveDesktop = true; } + if (!this.menuClick){ + this.overlayMenuActive = false; + } } if (this.configActive && !this.configClick) { From f6981cd0417ed2c584d4aea4183fe56cf564547c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:47:39 +0300 Subject: [PATCH 3/6] fix icon margin --- src/app/components/blockviewer/blockviewer.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/components/blockviewer/blockviewer.component.ts b/src/app/components/blockviewer/blockviewer.component.ts index e06d1b7..73ae3ba 100644 --- a/src/app/components/blockviewer/blockviewer.component.ts +++ b/src/app/components/blockviewer/blockviewer.component.ts @@ -1,5 +1,4 @@ import { Component, Input } from '@angular/core'; -import { environment } from '../../../environments/environment'; enum BlockView { PREVIEW, @@ -22,7 +21,7 @@ enum BlockView { Code + pTooltip="Copied to clipboard" tooltipEvent="focus" tooltipPosition="bottom">
From 1db6011a8ad3f51fdb20afb022eb3cf18ab50d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Fri, 7 Jan 2022 12:28:15 +0300 Subject: [PATCH 4/6] unnecessary variables removed --- src/app/app.config.component.ts | 17 ++++------------- src/app/service/app.menu.service.ts | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/app/app.config.component.ts b/src/app/app.config.component.ts index 726941f..7bbeada 100644 --- a/src/app/app.config.component.ts +++ b/src/app/app.config.component.ts @@ -6,23 +6,14 @@ import { AppMainComponent } from './app.main.component'; selector: 'app-config', templateUrl:'./app.config.component.html' }) -export class AppConfigComponent implements OnInit{ +export class AppConfigComponent { - topbarThemes: any[]; - - componentThemes: any[]; - - topbarColor = 'light'; - - componentColor = 'blue'; - - scale:number = 14; + scale: number = 14; - scales:any[] = [12,13,14,15,16]; + scales: any[] = [12,13,14,15,16]; - constructor(public app: AppComponent, public appMain: AppMainComponent) {} + constructor(public app: AppComponent, public appMain: AppMainComponent) { } - ngOnInit() { } replaceLink(linkElement, href) { if (this.isIE()) { linkElement.setAttribute('href', href); diff --git a/src/app/service/app.menu.service.ts b/src/app/service/app.menu.service.ts index 0163ecf..ba552db 100644 --- a/src/app/service/app.menu.service.ts +++ b/src/app/service/app.menu.service.ts @@ -15,6 +15,6 @@ export class MenuService { } reset() { - // this.resetSource.next(true); + this.resetSource.next(true); } } From fea22fa33d2dc3d1664e32db2b0ee2385ea7eb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Fri, 7 Jan 2022 15:40:43 +0300 Subject: [PATCH 5/6] Config updated --- src/app/api/appconfig.ts | 6 ++ src/app/app.component.ts | 14 +--- src/app/app.config.component.html | 74 +++++++++---------- src/app/app.config.component.ts | 69 ++++++++++------- src/app/app.footer.component.html | 2 +- src/app/app.footer.component.ts | 4 +- src/app/app.main.component.html | 6 +- src/app/app.main.component.ts | 27 +++---- src/app/app.menu.component.ts | 7 +- src/app/app.module.ts | 6 +- src/app/app.topbar.component.html | 2 +- src/app/app.topbar.component.ts | 13 +--- src/app/components/charts/charts.component.ts | 41 +++++++++- src/app/service/app.config.service.ts | 27 +++++++ 14 files changed, 182 insertions(+), 116 deletions(-) create mode 100644 src/app/api/appconfig.ts create mode 100644 src/app/service/app.config.service.ts diff --git a/src/app/api/appconfig.ts b/src/app/api/appconfig.ts new file mode 100644 index 0000000..f10fc54 --- /dev/null +++ b/src/app/api/appconfig.ts @@ -0,0 +1,6 @@ +export interface AppConfig { + inputStyle?: string; + dark?: boolean; + theme?: string; + ripple?: boolean; +} \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 53c9af7..2ffcb3f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -8,22 +8,10 @@ export class AppComponent { menuMode = 'static'; - inputStyle = 'outlined'; - - ripple: boolean; - - darkMode: boolean = false; - - lightMode: boolean = true; - - theme = 'light'; - - constructor(private primengConfig: PrimeNGConfig) { - } + constructor(private primengConfig: PrimeNGConfig) { } ngOnInit() { this.primengConfig.ripple = true; - this.ripple = true; document.documentElement.style.fontSize = '14px'; } } diff --git a/src/app/app.config.component.html b/src/app/app.config.component.html index 6b54fab..92296fc 100644 --- a/src/app/app.config.component.html +++ b/src/app/app.config.component.html @@ -14,19 +14,19 @@
Input Style
-
-
Ripple Effect
- +
Menu Type
@@ -44,22 +44,22 @@
Bootstrap
-
-
-
-
@@ -68,22 +68,22 @@
Material Design
-
-
-
-
@@ -92,22 +92,22 @@
Material Design Compact
-
-
-
-
@@ -116,7 +116,7 @@
Tailwind
-
@@ -125,7 +125,7 @@
Fluent UI
-
@@ -134,42 +134,42 @@
PrimeOne Design - 2022
-
-
-
-
-
-
-
-
@@ -178,62 +178,62 @@
PrimeOne Design - 2021
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/app.config.component.ts b/src/app/app.config.component.ts index 7bbeada..e4a0d90 100644 --- a/src/app/app.config.component.ts +++ b/src/app/app.config.component.ts @@ -1,41 +1,35 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { PrimeNGConfig } from 'primeng/api'; +import { Subscription } from 'rxjs'; +import { AppConfig } from './api/appconfig'; import { AppComponent } from './app.component'; import { AppMainComponent } from './app.main.component'; +import { ConfigService } from './service/app.config.service'; @Component({ selector: 'app-config', - templateUrl:'./app.config.component.html' + templateUrl: './app.config.component.html' }) -export class AppConfigComponent { +export class AppConfigComponent implements OnInit, OnDestroy { scale: number = 14; - - scales: any[] = [12,13,14,15,16]; - constructor(public app: AppComponent, public appMain: AppMainComponent) { } + scales: any[] = [12, 13, 14, 15, 16]; - replaceLink(linkElement, href) { - if (this.isIE()) { - linkElement.setAttribute('href', href); - } - else { - const id = linkElement.getAttribute('id'); - const cloneLinkElement = linkElement.cloneNode(true); + config: AppConfig; - cloneLinkElement.setAttribute('href', href); - cloneLinkElement.setAttribute('id', id + '-clone'); + subscription: Subscription; - linkElement.parentNode.insertBefore(cloneLinkElement, linkElement.nextSibling); + constructor(public app: AppComponent, public appMain: AppMainComponent, public configService: ConfigService, public primengConfig: PrimeNGConfig) { } - cloneLinkElement.addEventListener('load', () => { - linkElement.remove(); - cloneLinkElement.setAttribute('id', id); - }); - } - } + ngOnInit() { + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + this.scale = 14; - isIE() { - return /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent); + this.applyScale(); + }); } onConfigButtonClick(event) { @@ -44,18 +38,39 @@ export class AppConfigComponent { event.preventDefault(); } - incrementScale(){ + incrementScale() { this.scale++; this.applyScale(); } - decrementScale(){ + decrementScale() { this.scale--; this.applyScale(); } - applyScale(){ + applyScale() { document.documentElement.style.fontSize = this.scale + 'px'; } + onRippleChange(ripple) { + this.primengConfig.ripple = ripple; + this.configService.updateConfig({...this.config, ...{ripple}}); + } + + onInputStyleChange() { + console.log(this.config) + this.configService.updateConfig(this.config); + } + + changeTheme(theme:string, dark:boolean){ + let themeElement = document.getElementById('theme-css'); + themeElement.setAttribute('href', 'assets/theme/' + theme + '/theme.css'); + this.configService.updateConfig({...this.config, ...{theme, dark}}); + } + + ngOnDestroy() { + if (this.subscription) { + this.subscription.unsubscribe(); + } + } } \ No newline at end of file diff --git a/src/app/app.footer.component.html b/src/app/app.footer.component.html index 34d29da..b887fcd 100644 --- a/src/app/app.footer.component.html +++ b/src/app/app.footer.component.html @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/src/app/app.footer.component.ts b/src/app/app.footer.component.ts index dece5ec..a99898e 100644 --- a/src/app/app.footer.component.ts +++ b/src/app/app.footer.component.ts @@ -1,10 +1,10 @@ import { Component } from '@angular/core'; -import { AppComponent } from './app.component'; +import { AppMainComponent } from './app.main.component'; @Component({ selector: 'app-footer', templateUrl: './app.footer.component.html' }) export class AppFooterComponent{ - constructor(public app: AppComponent) {} + constructor(public appMain: AppMainComponent) {} } diff --git a/src/app/app.main.component.html b/src/app/app.main.component.html index 91ba382..b055634 100644 --- a/src/app/app.main.component.html +++ b/src/app/app.main.component.html @@ -1,11 +1,11 @@
+ 'p-ripple-disabled': !config.ripple, 'p-input-filled': config.inputStyle === 'filled'}">
diff --git a/src/app/app.main.component.ts b/src/app/app.main.component.ts index 024abef..ebbcb07 100644 --- a/src/app/app.main.component.ts +++ b/src/app/app.main.component.ts @@ -1,7 +1,9 @@ import { Component, AfterViewInit, OnDestroy, Renderer2, OnInit } from '@angular/core'; import { trigger, state, style, transition, animate } from '@angular/animations'; -import { PrimeNGConfig } from 'primeng/api'; import { AppComponent } from './app.component'; +import { ConfigService } from './service/app.config.service'; +import { AppConfig } from './api/appconfig'; +import { Subscription } from 'rxjs'; @Component({ selector: 'app-main', @@ -47,10 +49,15 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { configClick: boolean; - constructor(public renderer: Renderer2, private primengConfig: PrimeNGConfig, public app: AppComponent) {} + config: AppConfig; + + subscription: Subscription; + + constructor(public renderer: Renderer2, public app: AppComponent, public configService: ConfigService) { } ngOnInit() { - this.primengConfig.ripple = true; + this.config = this.configService.config; + this.subscription = this.configService.configUpdate$.subscribe(config => this.config = config); } ngAfterViewInit() { @@ -138,11 +145,6 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { this.menuClick = true; } - onRippleChange(event) { - this.app.ripple = event.checked; - this.primengConfig.ripple = event.checked; - } - onConfigClick(event) { this.configClick = true; } @@ -171,11 +173,10 @@ export class AppMainComponent implements AfterViewInit, OnDestroy, OnInit { if (this.documentClickListener) { this.documentClickListener(); } - } - changeTheme(theme:string, darkMode:boolean){ - let themeElement = document.getElementById('theme-css'); - themeElement.setAttribute('href', 'assets/theme/' + theme + '/theme.css'); - this.app.darkMode = darkMode; + + if (this.subscription) { + this.subscription.unsubscribe(); + } } } diff --git a/src/app/app.menu.component.ts b/src/app/app.menu.component.ts index 3dc1b9f..8c9f0ff 100644 --- a/src/app/app.menu.component.ts +++ b/src/app/app.menu.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { AppComponent } from './app.component'; +import { AppMainComponent } from './app.main.component'; @Component({ selector: 'app-menu', @@ -13,7 +13,7 @@ import { AppComponent } from './app.component'; - Prime Blocks + Prime Blocks
@@ -23,10 +23,9 @@ export class AppMenuComponent implements OnInit { model: any[]; - constructor(public app: AppComponent){} + constructor(public appMain: AppMainComponent) { } ngOnInit() { - this.model = [ { label: 'Home', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 867dc90..20778cb 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -96,6 +96,7 @@ import { AppFooterComponent } from './app.footer.component'; import { AppConfigComponent } from './app.config.component'; import { AppMenuComponent } from './app.menu.component'; import { AppMenuitemComponent } from './app.menuitem.component'; + import { DashboardComponent } from './components/dashboard/dashboard.component'; import { FormLayoutComponent } from './components/formlayout/formlayout.component'; import { FloatLabelComponent } from './components/floatlabel/floatlabel.component'; @@ -119,11 +120,11 @@ import { CrudComponent } from './components/crud/crud.component'; import { TimelineComponent } from './components/timeline/timeline.component'; import { IconsComponent } from './components/icons/icons.component'; import { BlocksComponent } from './components/blocks/blocks.component'; - import { PaymentComponent} from './components/menus/payment.component'; import { ConfirmationComponent } from './components/menus/confirmation.component'; import { PersonalComponent } from './components/menus/personal.component'; import { SeatComponent } from './components/menus/seat.component'; + import { CountryService } from './service/countryservice'; import { CustomerService } from './service/customerservice'; import { EventService } from './service/eventservice'; @@ -132,6 +133,7 @@ import { NodeService } from './service/nodeservice'; import { PhotoService } from './service/photoservice'; import { ProductService } from './service/productservice'; import { MenuService } from './service/app.menu.service'; +import { ConfigService } from './service/app.config.service'; @NgModule({ imports: [ @@ -263,7 +265,7 @@ import { MenuService } from './service/app.menu.service'; providers: [ {provide: LocationStrategy, useClass: HashLocationStrategy}, CountryService, CustomerService, EventService, IconService, NodeService, - PhotoService, ProductService, MenuService + PhotoService, ProductService, MenuService, ConfigService ], bootstrap: [AppComponent] }) diff --git a/src/app/app.topbar.component.html b/src/app/app.topbar.component.html index 35d4174..0e1698a 100644 --- a/src/app/app.topbar.component.html +++ b/src/app/app.topbar.component.html @@ -1,6 +1,6 @@
diff --git a/src/app/app.topbar.component.ts b/src/app/app.topbar.component.ts index 5622d60..a9b3a34 100644 --- a/src/app/app.topbar.component.ts +++ b/src/app/app.topbar.component.ts @@ -1,5 +1,4 @@ import { Component, OnDestroy } from '@angular/core'; -import { AppComponent } from './app.component'; import { AppMainComponent } from './app.main.component'; import { Subscription } from 'rxjs'; import { MenuItem } from 'primeng/api'; @@ -8,17 +7,9 @@ import { MenuItem } from 'primeng/api'; selector: 'app-topbar', templateUrl: './app.topbar.component.html' }) -export class AppTopBarComponent implements OnDestroy{ - - subscription: Subscription; +export class AppTopBarComponent { items: MenuItem[]; - constructor(public app: AppComponent, public appMain: AppMainComponent) {} - - ngOnDestroy() { - if (this.subscription) { - this.subscription.unsubscribe(); - } - } + constructor(public appMain: AppMainComponent) { } } diff --git a/src/app/components/charts/charts.component.ts b/src/app/components/charts/charts.component.ts index 4554485..5b20f8c 100755 --- a/src/app/components/charts/charts.component.ts +++ b/src/app/components/charts/charts.component.ts @@ -1,9 +1,12 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Subscription } from 'rxjs'; +import { AppConfig } from 'src/app/api/appconfig'; +import { ConfigService } from 'src/app/service/app.config.service'; @Component({ templateUrl: './charts.component.html' }) -export class ChartsComponent implements OnInit { +export class ChartsComponent implements OnInit, OnDestroy { lineData: any; @@ -25,7 +28,20 @@ export class ChartsComponent implements OnInit { radarOptions: any; + config: AppConfig; + + subscription: Subscription; + + constructor(public configService: ConfigService) { } + ngOnInit() { + this.config = this.configService.config; + + this.subscription = this.configService.configUpdate$.subscribe(config => { + this.config = config; + this.updateChartOptions(); + }); + this.lineData = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ @@ -236,4 +252,25 @@ export class ChartsComponent implements OnInit { } }; } + + updateChartOptions() { + if (this.config.dark) + this.applyDarkTheme(); + else + this.applyLightTheme(); + } + + applyLightTheme() { + + } + + applyDarkTheme() { + + } + + ngOnDestroy() { + if (this.subscription) { + this.subscription.unsubscribe(); + } + } } diff --git a/src/app/service/app.config.service.ts b/src/app/service/app.config.service.ts new file mode 100644 index 0000000..0a165d6 --- /dev/null +++ b/src/app/service/app.config.service.ts @@ -0,0 +1,27 @@ +import { Injectable } from '@angular/core'; +import { Subject } from 'rxjs'; +import { AppConfig } from '../api/appconfig'; + +@Injectable() +export class ConfigService { + + config: AppConfig = { + theme: 'lara-light-indigo', + dark: false, + inputStyle: 'outlined', + ripple: true + }; + + private configUpdate = new Subject(); + + configUpdate$ = this.configUpdate.asObservable(); + + updateConfig(config: AppConfig) { + this.config = config; + this.configUpdate.next(config); + } + + getConfig() { + return this.config; + } +} From ffd58ddc301f2db09fb646ebb6e97e77fc2ab70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Fri, 7 Jan 2022 16:07:38 +0300 Subject: [PATCH 6/6] Fix charts --- src/app/app.config.component.ts | 1 - src/app/components/charts/charts.component.ts | 208 +++++++++++++++++- 2 files changed, 202 insertions(+), 7 deletions(-) diff --git a/src/app/app.config.component.ts b/src/app/app.config.component.ts index e4a0d90..2513072 100644 --- a/src/app/app.config.component.ts +++ b/src/app/app.config.component.ts @@ -58,7 +58,6 @@ export class AppConfigComponent implements OnInit, OnDestroy { } onInputStyleChange() { - console.log(this.config) this.configService.updateConfig(this.config); } diff --git a/src/app/components/charts/charts.component.ts b/src/app/components/charts/charts.component.ts index 5b20f8c..23748dd 100755 --- a/src/app/components/charts/charts.component.ts +++ b/src/app/components/charts/charts.component.ts @@ -36,7 +36,6 @@ export class ChartsComponent implements OnInit, OnDestroy { ngOnInit() { this.config = this.configService.config; - this.subscription = this.configService.configUpdate$.subscribe(config => { this.config = config; this.updateChartOptions(); @@ -68,7 +67,7 @@ export class ChartsComponent implements OnInit, OnDestroy { plugins: { legend: { labels: { - fontColor: '#A0A7B5' + color: '#A0A7B5' } } }, @@ -112,7 +111,7 @@ export class ChartsComponent implements OnInit, OnDestroy { plugins: { legend: { labels: { - fontColor: '#A0A7B5' + color: '#A0A7B5' } } }, @@ -159,7 +158,7 @@ export class ChartsComponent implements OnInit, OnDestroy { plugins: { legend: { labels: { - fontColor: '#A0A7B5' + color: '#A0A7B5' } } } @@ -196,7 +195,7 @@ export class ChartsComponent implements OnInit, OnDestroy { plugins: { legend: { labels: { - fontColor: '#A0A7B5' + color: '#A0A7B5' } } }, @@ -239,7 +238,7 @@ export class ChartsComponent implements OnInit, OnDestroy { plugins: { legend: { labels: { - fontColor: '#A0A7B5' + color: '#A0A7B5' } } }, @@ -261,11 +260,208 @@ export class ChartsComponent implements OnInit, OnDestroy { } applyLightTheme() { + this.lineOptions = { + plugins: { + legend: { + labels: { + color: '#A0A7B5' + } + } + }, + scales: { + x: { + ticks: { + color: '#A0A7B5' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + y: { + ticks: { + color: '#A0A7B5' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + } + }; + + this.barOptions = { + plugins: { + legend: { + labels: { + color: '#A0A7B5' + } + } + }, + scales: { + x: { + ticks: { + color: '#A0A7B5' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + y: { + ticks: { + color: '#A0A7B5' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + } + }; + + this.pieOptions = { + plugins: { + legend: { + labels: { + color: '#A0A7B5' + } + } + } + }; + + this.polarOptions = { + plugins: { + legend: { + labels: { + color: '#A0A7B5' + } + } + }, + scales: { + r: { + grid: { + color: 'rgba(160, 167, 181, .3)' + } + } + } + }; + + this.radarOptions = { + plugins: { + legend: { + labels: { + color: '#A0A7B5' + } + } + }, + scales: { + r: { + grid: { + color: 'rgba(160, 167, 181, .3)' + } + } + } + }; } applyDarkTheme() { + this.lineOptions = { + plugins: { + legend: { + labels: { + color: '#ebedef' + } + } + }, + scales: { + x: { + ticks: { + color: '#ebedef' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + y: { + ticks: { + color: '#ebedef' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + } + }; + this.barOptions = { + plugins: { + legend: { + labels: { + color: '#ebedef' + } + } + }, + scales: { + x: { + ticks: { + color: '#ebedef' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + y: { + ticks: { + color: '#ebedef' + }, + grid: { + color: 'rgba(160, 167, 181, .3)', + } + }, + } + }; + + this.pieOptions = { + plugins: { + legend: { + labels: { + color: '#ebedef' + } + } + } + }; + + this.polarOptions = { + plugins: { + legend: { + labels: { + color: '#ebedef' + } + } + }, + scales: { + r: { + grid: { + color: 'rgba(160, 167, 181, .3)' + } + } + } + }; + + this.radarOptions = { + plugins: { + legend: { + labels: { + color: '#ebedef' + } + } + }, + scales: { + r: { + grid: { + color: 'rgba(160, 167, 181, .3)' + } + } + } + }; } ngOnDestroy() {