Quitar la barra de Plotly en las curvas de la ficha
This commit is contained in:
@@ -298,7 +298,7 @@
|
|||||||
@if (riskSeries.value()?.length) {
|
@if (riskSeries.value()?.length) {
|
||||||
<app-risk-series [series]="riskSeries.value()!" />
|
<app-risk-series [series]="riskSeries.value()!" />
|
||||||
} @else {
|
} @else {
|
||||||
<app-plot [figure]="curve()" [height]="300" />
|
<app-plot [figure]="curve()" [height]="300" [toolbar]="false" />
|
||||||
}
|
}
|
||||||
</details>
|
</details>
|
||||||
}
|
}
|
||||||
@@ -615,7 +615,7 @@
|
|||||||
Kaplan-Meier de pacientes con sus mismos valores (IC 95 % Greenwood log-log; n =
|
Kaplan-Meier de pacientes con sus mismos valores (IC 95 % Greenwood log-log; n =
|
||||||
{{ c.n }}, fallecidos = {{ c.fallecidos }}).
|
{{ c.n }}, fallecidos = {{ c.fallecidos }}).
|
||||||
</p>
|
</p>
|
||||||
<app-plot [figure]="c.figure" [height]="340" />
|
<app-plot [figure]="c.figure" [height]="340" [toolbar]="false" />
|
||||||
} @else {
|
} @else {
|
||||||
<p class="muted">{{ c.missing }}</p>
|
<p class="muted">{{ c.missing }}</p>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export function parseSeries(answer: Parameters): Series[] {
|
|||||||
@for (assumption of assumptions(); track assumption) {
|
@for (assumption of assumptions(); track assumption) {
|
||||||
<p class="muted">{{ assumption }}</p>
|
<p class="muted">{{ assumption }}</p>
|
||||||
}
|
}
|
||||||
<app-plot [figure]="figure()" [height]="340" />
|
<app-plot [figure]="figure()" [height]="340" [toolbar]="false" />
|
||||||
}
|
}
|
||||||
@if (!available().length) {
|
@if (!available().length) {
|
||||||
<p class="muted">No disponible: datos insuficientes.</p>
|
<p class="muted">No disponible: datos insuficientes.</p>
|
||||||
|
|||||||
+6
-1
@@ -75,12 +75,17 @@ const CONFIG: Partial<Plotly.Config> = {
|
|||||||
export class Plot implements OnDestroy {
|
export class Plot implements OnDestroy {
|
||||||
readonly figure = input.required<Figure>();
|
readonly figure = input.required<Figure>();
|
||||||
readonly height = input(320);
|
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');
|
private readonly host = viewChild.required<ElementRef<HTMLDivElement>>('host');
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
effect(() => {
|
effect(() => {
|
||||||
const { data, layout } = this.figure();
|
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