mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-25 12:04:44 +03:00
be5425cbed
On-chart extrema labels were colliding with the Y-axis ticks at the top, the X-axis timestamps at the bottom, and the chart line itself when min/max sat near a chart edge. Replace the floating labels with a single rounded pill in the chart's top-right corner that lists "▲ max ▼ min", outside the drawing area. Dots still mark the points on the line. Also nudge Y tick text 4px left, push X timestamps down with tickMargin=14, and widen YAxis to 56px so values like "234 KB/s" don't crowd the chart.
35 lines
645 B
CSS
35 lines
645 B
CSS
.sparkline-svg {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
.sparkline-container {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.sparkline-extrema {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 8px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 2px 8px;
|
|
background: color-mix(in srgb, var(--ant-color-bg-elevated) 88%, transparent);
|
|
border: 1px solid var(--ant-color-border-secondary);
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
line-height: 16px;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
.sparkline-extrema .extrema-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
white-space: nowrap;
|
|
}
|