Add PNG export for charts

- Hover any chart to reveal download button
- Exports with white background and padding
- Works on Dashboard and Comparison pages
This commit is contained in:
fahed
2026-02-02 17:39:11 +03:00
parent a2e7aa16cd
commit 22878d5a16
4 changed files with 111 additions and 14 deletions

View File

@@ -1774,3 +1774,41 @@ table tbody tr:hover {
font-size: 1.5rem;
}
}
/* Chart Export Button */
.exportable-chart {
position: relative;
}
.chart-export-btn {
position: absolute;
top: 8px;
right: 8px;
z-index: 10;
width: 32px;
height: 32px;
border: none;
background: var(--bg-secondary);
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
opacity: 0;
transition: opacity 0.15s ease, background 0.15s ease;
}
.exportable-chart:hover .chart-export-btn {
opacity: 1;
}
.chart-export-btn:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
}
.chart-canvas-wrapper {
width: 100%;
height: 100%;
}