Quitar la barra de Plotly en las curvas de la ficha
This commit is contained in:
+6
-1
@@ -75,12 +75,17 @@ const CONFIG: Partial<Plotly.Config> = {
|
||||
export class Plot implements OnDestroy {
|
||||
readonly figure = input.required<Figure>();
|
||||
readonly height = input(320);
|
||||
/** Plotly's buttons over the chart; a record's curves go without them */
|
||||
readonly toolbar = input(true);
|
||||
private readonly host = viewChild.required<ElementRef<HTMLDivElement>>('host');
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
const { data, layout } = this.figure();
|
||||
void Plotly.react(this.host().nativeElement, withRoom(data), layoutOf(layout), CONFIG);
|
||||
void Plotly.react(this.host().nativeElement, withRoom(data), layoutOf(layout), {
|
||||
...CONFIG,
|
||||
...(this.toolbar() ? {} : { displayModeBar: false }),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user