Ficha: dibujar el intervalo sobre la escala y llevar la fecha índice al pie
This commit is contained in:
@@ -79,7 +79,7 @@ export function riskGroups(
|
|||||||
}
|
}
|
||||||
@for (g of groups(); track $index) {
|
@for (g of groups(); track $index) {
|
||||||
@if (g.title) {
|
@if (g.title) {
|
||||||
<h3>{{ g.title }}{{ g.index ? ' · fecha índice ' + g.index : '' }}</h3>
|
<h3>{{ g.title }}</h3>
|
||||||
}
|
}
|
||||||
@for (s of g.scales; track s.label) {
|
@for (s of g.scales; track s.label) {
|
||||||
<div class="risk-scale" [attr.data-scale]="s.label">
|
<div class="risk-scale" [attr.data-scale]="s.label">
|
||||||
@@ -97,6 +97,14 @@ export function riskGroups(
|
|||||||
<div class="risk-plot" [class.unavailable]="!s.risk">
|
<div class="risk-plot" [class.unavailable]="!s.risk">
|
||||||
<div class="risk-line" aria-hidden="true"></div>
|
<div class="risk-line" aria-hidden="true"></div>
|
||||||
@if (s.risk; as r) {
|
@if (s.risk; as r) {
|
||||||
|
@if (r.low !== undefined && r.high !== undefined) {
|
||||||
|
<span
|
||||||
|
class="risk-interval"
|
||||||
|
[style.left.%]="r.low * 100"
|
||||||
|
[style.width.%]="(r.high - r.low) * 100"
|
||||||
|
aria-hidden="true"
|
||||||
|
></span>
|
||||||
|
}
|
||||||
<span class="risk-marker" [style.left.%]="r.p * 100" aria-hidden="true"></span>
|
<span class="risk-marker" [style.left.%]="r.p * 100" aria-hidden="true"></span>
|
||||||
<strong
|
<strong
|
||||||
class="risk-value"
|
class="risk-value"
|
||||||
@@ -110,6 +118,9 @@ export function riskGroups(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@if (g.index) {
|
||||||
|
<p class="muted foot">Fecha índice {{ g.index }}</p>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
styles: `
|
styles: `
|
||||||
@@ -124,7 +135,7 @@ export function riskGroups(
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.risk-plot {
|
.risk-plot {
|
||||||
padding-top: 24px;
|
padding-top: 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.risk-line {
|
.risk-line {
|
||||||
@@ -146,6 +157,26 @@ export function riskGroups(
|
|||||||
#fff 25%
|
#fff 25%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
.risk-interval {
|
||||||
|
border-left: 2px solid #17324d;
|
||||||
|
border-right: 2px solid #17324d;
|
||||||
|
height: 8px;
|
||||||
|
min-width: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
}
|
||||||
|
.risk-interval::before {
|
||||||
|
background: #17324d;
|
||||||
|
content: '';
|
||||||
|
height: 2px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 3px;
|
||||||
|
}
|
||||||
|
.foot {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
.risk-marker {
|
.risk-marker {
|
||||||
background: #17324d;
|
background: #17324d;
|
||||||
bottom: -2px;
|
bottom: -2px;
|
||||||
|
|||||||
Reference in New Issue
Block a user