La leyenda de la dona dice el monto junto al porcentaje

This commit is contained in:
Jorem Juárez committed 2026-09-01 11:18:48 -06:00
1 parent 3a73c8a8bc
commit 3f540ef1c8
3 files changed
+12 -1

No files matched your search

+3
View File
@@ -496,6 +496,9 @@ export class BeyondPos extends Component {
angulo = fin;
return { ...c, d, color: this.color(c.clave),
porcentaje: (c.valor / total) * 100,
// La leyenda dice el monto Y el porcentaje: la
// proporción sola obliga a sacar la cuenta de cabeza.
montoTexto: this.dineroEje(c.valor),
titulo: `${c.etiqueta} · ${this.dinero(c.valor)} · ${((c.valor / total) * 100).toFixed(1)}%` };
});
}
@@ -42,6 +42,10 @@
font-weight: 600;
fill: var(--bs-body-color, #212529);
}
.beyond_grafica .beyond_leyenda_monto {
font-weight: 600;
fill: var(--bs-body-color, #212529);
}
.beyond_grafica .beyond_dona_total {
font-size: 24px;
font-weight: 700;
+5 -1
View File
@@ -59,12 +59,16 @@
<text x="500" y="168" text-anchor="middle" class="beyond_eje">
en total
</text>
<!-- Monto Y porcentaje: la proporción sola obliga a sacar
la cuenta de cabeza (encargo del 01-sep-2026). -->
<g t-foreach="dona" t-as="arco" t-key="arco.clave + '_l'">
<rect t-att-x="660" t-att-y="80 + arco_index * 34"
width="14" height="14" rx="3" t-att-fill="arco.color"/>
<text t-att-x="684" t-att-y="92 + arco_index * 34"
class="beyond_leyenda">
<t t-esc="arco.etiqueta"/> · <t t-esc="porcentaje(arco.porcentaje)"/>
<t t-esc="arco.etiqueta"/> ·
<tspan class="beyond_leyenda_monto" t-esc="arco.montoTexto"/>
· <t t-esc="porcentaje(arco.porcentaje)"/>
</text>
</g>
</svg>