Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
- web/src/viz/kit/charts.tsx +7 -3
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "cd6ed6d43",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
cd6ed6d43
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
93921882416517519e28c4a1393221d3cf985557ef7fd006f9d3292c03307acf
|
web/src/viz/kit/charts.tsx
CHANGED
|
@@ -274,8 +274,9 @@ export function ComboChart({ title, currency, data, bars, line, markers = [], si
|
|
| 274 |
const start = Math.max(64, 16 + 7 * Math.max(...ticks.map(t => formatMeasure(t, currency).length)));
|
| 275 |
const right = width - Math.max(40, labelWidth);
|
| 276 |
const top = 24, bottom = height - 48;
|
| 277 |
-
const every = Math.max(1, Math.ceil(data.length / Math.max(2, Math.floor((right - start) / 90))));
|
| 278 |
const step = (right - start) / data.length;
|
|
|
|
|
|
|
| 279 |
const y = (v: number) => bottom - (v - lo) / (hi - lo) * (bottom - top);
|
| 280 |
const x = (i: number) => start + (i + 0.5) * step;
|
| 281 |
const barWidth = step * 0.8 / Math.max(1, bars.length);
|
|
@@ -308,8 +309,11 @@ export function ComboChart({ title, currency, data, bars, line, markers = [], si
|
|
| 308 |
<text x={start - 10} y={y(tick) + 4} textAnchor="end">{formatMeasure(tick, unit)}</text>
|
| 309 |
</g>)}
|
| 310 |
{lo < 0 && <g className="lp-chart-axis"><line x1={start} x2={right} y1={y(0)} y2={y(0)} strokeWidth={2} /></g>}
|
| 311 |
-
{data.map((row, i) => (i === 0 || i === data.length - 1
|
| 312 |
-
&&
|
|
|
|
|
|
|
|
|
|
| 313 |
{data.map((row, i) => marked.has(row.label) && <g key={`marker:${row.label}`} className="lp-chart-axis" data-chart-marker={row.label}>
|
| 314 |
<line x1={x(i)} x2={x(i)} y1={top} y2={bottom} strokeDasharray="4 4" />
|
| 315 |
</g>)}
|
|
|
|
| 274 |
const start = Math.max(64, 16 + 7 * Math.max(...ticks.map(t => formatMeasure(t, currency).length)));
|
| 275 |
const right = width - Math.max(40, labelWidth);
|
| 276 |
const top = 24, bottom = height - 48;
|
|
|
|
| 277 |
const step = (right - start) / data.length;
|
| 278 |
+
const every = Math.max(1, Math.ceil(data.length / Math.max(2, Math.floor((right - start) / 90))),
|
| 279 |
+
Math.ceil((Math.max(...data.map(row => row.label.length)) * 7 + 16) / step));
|
| 280 |
const y = (v: number) => bottom - (v - lo) / (hi - lo) * (bottom - top);
|
| 281 |
const x = (i: number) => start + (i + 0.5) * step;
|
| 282 |
const barWidth = step * 0.8 / Math.max(1, bars.length);
|
|
|
|
| 309 |
<text x={start - 10} y={y(tick) + 4} textAnchor="end">{formatMeasure(tick, unit)}</text>
|
| 310 |
</g>)}
|
| 311 |
{lo < 0 && <g className="lp-chart-axis"><line x1={start} x2={right} y1={y(0)} y2={y(0)} strokeWidth={2} /></g>}
|
| 312 |
+
{data.map((row, i) => (i === 0 || i === data.length - 1
|
| 313 |
+
|| (i % every === 0 && i >= every && data.length - 1 - i >= every))
|
| 314 |
+
&& <text key={row.label} className="lp-chart-tick"
|
| 315 |
+
x={i === 0 ? start : i === data.length - 1 ? right : x(i)} y={bottom + 28}
|
| 316 |
+
textAnchor={i === 0 ? "start" : i === data.length - 1 ? "end" : "middle"}>{row.label}</text>)}
|
| 317 |
{data.map((row, i) => marked.has(row.label) && <g key={`marker:${row.label}`} className="lp-chart-axis" data-chart-marker={row.label}>
|
| 318 |
<line x1={x(i)} x2={x(i)} y1={top} y2={bottom} strokeDasharray="4 4" />
|
| 319 |
</g>)}
|