20261118 Sharts Colors
This commit is contained in:
@@ -2,6 +2,7 @@ import { AfterViewInit, Component, inject, ElementRef, Input, OnChanges, OnDestr
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { PlotlyFigure } from '../../features/indicadores/indicadores.models';
|
||||
import { recolorFigure } from '../../features/indicadores/indicadores-c2-palette';
|
||||
import { PlotlyController } from './plotly-controller';
|
||||
import { PLOTLY_LOADER } from './plotly-runtime';
|
||||
|
||||
@@ -68,12 +69,12 @@ export class PlotlyChart implements AfterViewInit, OnChanges, OnDestroy {
|
||||
this.observer = new ResizeObserver(this.windowResize);
|
||||
this.observer.observe(this.host.nativeElement);
|
||||
} else window.addEventListener('resize', this.windowResize);
|
||||
this.controller.setFigure(this.figure);
|
||||
this.controller.setFigure(recolorFigure(this.figure));
|
||||
// Also supply the initial width in browsers without ResizeObserver.
|
||||
this.windowResize();
|
||||
}
|
||||
ngOnChanges() { if (this.figure) this.controller?.setFigure(this.figure); }
|
||||
retry() { this.controller?.setFigure(this.figure); }
|
||||
ngOnChanges() { if (this.figure) this.controller?.setFigure(recolorFigure(this.figure)); }
|
||||
retry() { this.controller?.setFigure(recolorFigure(this.figure)); }
|
||||
ngOnDestroy() {
|
||||
this.observer?.disconnect();
|
||||
if (this.widthFrame !== undefined) cancelAnimationFrame(this.widthFrame);
|
||||
|
||||
Reference in New Issue
Block a user