integrating latest dashboard changes
This commit is contained in:
@@ -22,7 +22,7 @@ import { PLOTLY_LOADER } from './plotly-runtime';
|
||||
</section>
|
||||
}
|
||||
`,
|
||||
styles: `:host { display: block; min-width: 0; } .plot-viewport { min-width: 0; overflow-x: auto; } .plot-viewport:focus-visible { outline: 2px solid var(--issste-text); outline-offset: 2px; } .plot { width: 100%; min-width: var(--plot-min-width, 0px); min-height: 620px; visibility: hidden; } [role=alert] { padding: 1rem; } .notes { padding: 1rem; overflow-wrap: anywhere; } .notes h2 { font-size: 1rem; } .notes p { line-height: 1.5; }`,
|
||||
styles: `:host { display: block; min-width: 0; } .plot-viewport { min-width: 0; overflow-x: auto; } .plot-viewport:focus-visible { outline: 2px solid var(--issste-text); outline-offset: 2px; } .plot { width: 100%; min-width: var(--plot-min-width, 0px); min-height: var(--plot-height, 620px); visibility: hidden; } [role=alert] { padding: 1rem; } .notes { padding: 1rem; overflow-wrap: anywhere; } .notes h2 { font-size: 1rem; } .notes p { line-height: 1.5; }`,
|
||||
})
|
||||
export class PlotlyChart implements AfterViewInit, OnChanges, OnDestroy {
|
||||
@Input() showNotes = true;
|
||||
@@ -31,6 +31,7 @@ export class PlotlyChart implements AfterViewInit, OnChanges, OnDestroy {
|
||||
@ViewChild('host', { static: true }) host!: ElementRef<HTMLElement>;
|
||||
readonly renderError = output<void>();
|
||||
readonly widthChanged = output<number>();
|
||||
readonly plotClick = output<unknown>();
|
||||
readonly status = signal<'loading' | 'ready' | 'error'>('loading');
|
||||
get notes(): string[] {
|
||||
const annotations = this.figure?.layout['annotations'];
|
||||
@@ -56,7 +57,7 @@ export class PlotlyChart implements AfterViewInit, OnChanges, OnDestroy {
|
||||
this.controller = new PlotlyController(this.host.nativeElement, this.loadPlotly, state => {
|
||||
this.status.set(state);
|
||||
if (state === 'error') this.renderError.emit();
|
||||
});
|
||||
}, event => this.plotClick.emit(event));
|
||||
if (typeof ResizeObserver !== 'undefined') {
|
||||
this.observer = new ResizeObserver(this.windowResize);
|
||||
this.observer.observe(this.host.nativeElement);
|
||||
|
||||
Reference in New Issue
Block a user