Single chamber chart panel
This commit is contained in:
1 parent
6e54786813
commit
b129637c74
1 file changed
+53
-1
@@ -258,7 +258,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Metric rows -->
|
||||
<div class="rows">
|
||||
<div class="rows" class:single={singleChamber !== null}>
|
||||
{#each metrics as m (m.key)}
|
||||
<div class="row" class:single={singleChamber !== null}>
|
||||
<div class="row-label">
|
||||
@@ -663,6 +663,48 @@
|
||||
max-width: 42vw;
|
||||
}
|
||||
|
||||
/* Single chamber desktop: side-by-side sparklines and radar */
|
||||
@media (min-width: 901px) {
|
||||
:global(.rows.single) {
|
||||
position: relative;
|
||||
padding-right: 210px; /* make room for radar column */
|
||||
}
|
||||
|
||||
:global(.rows.single .row-radar) {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 0;
|
||||
width: 190px;
|
||||
height: calc(100% - 24px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-bottom: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
:global(.row-radar.single .row-label) {
|
||||
justify-content: center;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
:global(.row-radar.single .cell-radar) {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
max-width: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Calibrating placeholder fits the tighter space */
|
||||
:global(.row-radar.single .calibrating) {
|
||||
min-height: 0;
|
||||
max-width: none;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 900px) {
|
||||
.panel-title { font-size: 22px; }
|
||||
@@ -677,5 +719,15 @@
|
||||
padding-bottom: 4px;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/* Reset single chamber side-by-side on mobile */
|
||||
:global(.rows.single) {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
:global(.rows.single .row-radar) {
|
||||
position: static !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user