fixing tooltip theme.
This commit is contained in:
@@ -56,6 +56,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
// Private
|
// Private
|
||||||
private _unsubscribeAll: Subject<any>;
|
private _unsubscribeAll: Subject<any>;
|
||||||
|
private systemPrefersDark: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -77,6 +78,9 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.smartAttributeDataSource = new MatTableDataSource();
|
this.smartAttributeDataSource = new MatTableDataSource();
|
||||||
// this.recentTransactionsTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh'];
|
// this.recentTransactionsTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh'];
|
||||||
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh','ideal', 'failure', 'history'];
|
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh','ideal', 'failure', 'history'];
|
||||||
|
|
||||||
|
this.systemPrefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
@@ -373,6 +377,11 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// theme:{
|
||||||
|
// // @ts-ignore
|
||||||
|
// // mode:
|
||||||
|
// mode: 'dark',
|
||||||
|
// },
|
||||||
tooltip: {
|
tooltip: {
|
||||||
fixed: {
|
fixed: {
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -389,7 +398,9 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
marker: {
|
marker: {
|
||||||
show: false
|
show: false
|
||||||
}
|
},
|
||||||
|
theme: this.determineTheme(this.config)
|
||||||
|
|
||||||
},
|
},
|
||||||
stroke: {
|
stroke: {
|
||||||
width: 2,
|
width: 2,
|
||||||
@@ -398,6 +409,13 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private determineTheme(config:AppConfig): string {
|
||||||
|
if (config.theme === 'system') {
|
||||||
|
return this.systemPrefersDark ? 'dark' : 'light'
|
||||||
|
} else {
|
||||||
|
return config.theme
|
||||||
|
}
|
||||||
|
}
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ Public methods
|
// @ Public methods
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -17,8 +17,4 @@
|
|||||||
color: #0694a2 !important
|
color: #0694a2 !important
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.apexcharts-tooltip {
|
|
||||||
background: #242b38 !important;
|
|
||||||
//color: orange;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user