Show project name and percentage on same line in pie chart
All checks were successful
Build and Push Docker Images / docker (push) Successful in 58s
All checks were successful
Build and Push Docker Images / docker (push) Successful in 58s
- Combine project name and percentage into single label line - Format: "Project Name (25.0%)" - Reduces vertical space and improves readability - Cleaner, more compact label design 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3273d4af2a
commit
f0337101cf
@ -82,24 +82,15 @@ export function RechartsPortfolioPieChart({
|
||||
className="print:stroke-gray-400"
|
||||
/>
|
||||
|
||||
{/* Two-line label text - project name and percentage only */}
|
||||
{/* Single-line label text - project name with percentage */}
|
||||
<text
|
||||
x={lineEndX}
|
||||
y={y - 6}
|
||||
y={y}
|
||||
textAnchor={textAnchor}
|
||||
className="fill-slate-700 print:text-[7px]"
|
||||
style={{ fontSize: '10px', fontWeight: 600 }}
|
||||
>
|
||||
{name}
|
||||
</text>
|
||||
<text
|
||||
x={lineEndX}
|
||||
y={y + 8}
|
||||
textAnchor={textAnchor}
|
||||
className="fill-slate-800 print:text-[6px]"
|
||||
style={{ fontSize: '9px', fontWeight: 700 }}
|
||||
>
|
||||
{percentage.toFixed(1)}%
|
||||
{name} ({percentage.toFixed(1)}%)
|
||||
</text>
|
||||
</g>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user