mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-20 23:14:07 +01:00
fix(chart): resize chart on sidebar expand/collapse (#1816)
This commit is contained in:
parent
f20c371c17
commit
aa8e7cdf27
16 changed files with 393 additions and 172 deletions
|
|
@ -15,6 +15,7 @@ import { EarningService } from './earning.service';
|
|||
import { OrdersProfitChartService } from './orders-profit-chart.service';
|
||||
import { TrafficBarService } from './traffic-bar.service';
|
||||
import { ProfitBarAnimationChartService } from './profit-bar-animation-chart.service';
|
||||
import { LayoutService } from './layout.service';
|
||||
|
||||
const SERVICES = [
|
||||
UserService,
|
||||
|
|
@ -31,6 +32,7 @@ const SERVICES = [
|
|||
OrdersProfitChartService,
|
||||
TrafficBarService,
|
||||
ProfitBarAnimationChartService,
|
||||
LayoutService,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
|||
20
src/app/@core/data/layout.service.ts
Normal file
20
src/app/@core/data/layout.service.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { delay, share } from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class LayoutService {
|
||||
|
||||
protected layoutSize$ = new Subject();
|
||||
|
||||
changeLayoutSize() {
|
||||
this.layoutSize$.next();
|
||||
}
|
||||
|
||||
onChangeLayoutSize(): Observable<any> {
|
||||
return this.layoutSize$.pipe(
|
||||
share(),
|
||||
delay(1),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue