Show min/max y-axis values on each profile chart
Plain HTML overlays, not SVG text: the chart's viewBox scales width and height independently (preserveAspectRatio="none", for a responsive width at a fixed pixel height), so text drawn inside that coordinate space would get stretched by the mismatched factor.
This commit is contained in:
1 parent
105651f005
commit
4f7fe3c2a4
2 files changed
+39
-6
No files matched your search
@@ -578,9 +578,14 @@ html, body {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.profile-chart__plot {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.profile-chart__svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
@@ -590,6 +595,30 @@ html, body {
|
||||
vector-effect: non-scaling-stroke;
|
||||
}
|
||||
|
||||
/* Overlaid as plain HTML, not SVG text: the chart's viewBox scales width
|
||||
and height independently (preserveAspectRatio="none", so the line fills
|
||||
a responsive width at a fixed pixel height) — text drawn inside that
|
||||
coordinate space would get stretched by the same mismatched factor. */
|
||||
.profile-chart__axis-value {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
color: #898781;
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
background: rgba(252, 252, 251, 0.75);
|
||||
padding: 1px 3px;
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.profile-chart__axis-value--max {
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.profile-chart__axis-value--min {
|
||||
bottom: 2px;
|
||||
}
|
||||
|
||||
.profile-panel__tooltip {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
Reference in new issue
Block a user