To-do report: активных дней за последние 7 рядом с активностью за день снимка; подпись над столбиком не обрезается
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ export function renderPersonChart(days: ActivityDay[], threshold: number, yMax:
|
||||
const w = days.length * CELL;
|
||||
const cols = days
|
||||
.map((d, i) => {
|
||||
const h = d.total > 0 ? Math.max(3, Math.round((d.total / yMax) * (CHART_H - 6))) : 0;
|
||||
const h = d.total > 0 ? Math.max(3, Math.round((d.total / yMax) * (CHART_H - 14))) : 0;
|
||||
const bar = h ? `<rect x="${i * CELL + 3}" y="${CHART_H - h}" width="${CELL - 6}" height="${h}" fill="#ffffff" stroke="#111827" stroke-width="0.8"/>` : "";
|
||||
const num = d.total > 0 ? `<text x="${i * CELL + CELL / 2}" y="${CHART_H - h - 2}" text-anchor="middle" font-size="8" font-weight="700" fill="#111827" paint-order="stroke" stroke="#ffffff" stroke-width="2">${d.total}</text>` : "";
|
||||
return `<g><title>${esc(describeDay(d, threshold))} (${weekday(d.date)})</title><rect x="${i * CELL}" y="0" width="${CELL}" height="${CHART_H}" fill="${COLORS[d.status]}" stroke="#ffffff" stroke-width="0.6"/>${bar}${num}</g>`;
|
||||
|
||||
Reference in New Issue
Block a user