Skip to content

Commit e882a5c

Browse files
committed
Fix status chart clipping
1 parent 89cce65 commit e882a5c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ input[type="range"] {
133133
#chart-hourly { height: 110px; width: 100%; display: block; }
134134
#chart-sog { height: 90px; width: 100%; display: block; }
135135
#chart-types { height: 160px; width: 100%; display: block; }
136-
#chart-status { height: 110px; width: 100%; display: block; }
136+
#chart-status { height: 130px; width: 100%; display: block; }
137137

138138

139139
.vessel-popup { min-width: 160px; }

docs/js/charts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Charts = (() => {
66
d3.select(el).selectAll("*").remove();
77
}
88

9-
const CHART_HEIGHTS = { "chart-hourly": 110, "chart-sog": 90, "chart-types": 160, "chart-status": 110 };
9+
const CHART_HEIGHTS = { "chart-hourly": 110, "chart-sog": 90, "chart-types": 160, "chart-status": 130 };
1010

1111
function getSize(el) {
1212
const r = el.getBoundingClientRect();
@@ -158,8 +158,8 @@ const Charts = (() => {
158158
const el = sel("chart-status");
159159
clearSvg(el);
160160
const { w, h } = getSize(el);
161-
const r = Math.min(w / 2, h) * 0.82;
162-
const cx = w * 0.35;
161+
const r = Math.min(w * 0.22, h * 0.42);
162+
const cx = r + 6;
163163
const cy = h / 2;
164164

165165
const STATUS_COLORS = {

0 commit comments

Comments
 (0)