Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions frontend/src/components/PortfolioChart/PortfolioChart.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
.portfolio-chart {
position: relative;
padding: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.portfolio-chart.mobile-view {
padding: 10px;
}

.chart-title {
margin: 0 0 20px 0;
font-size: 1.25rem;
font-weight: 600;
color: #333;
}

.range-picker {
display: flex;
gap: 10px;
margin-bottom: 20px;
justify-content: flex-end;
}

.range-picker button {
padding: 5px 12px;
background: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
}

.range-picker button.active {
background: #4CAF50;
color: white;
border-color: #4CAF50;
}

.chart-container {
position: relative;
margin-bottom: 20px;
}

.chart-container svg {
display: block;
margin: 0 auto;
}

.chart-legend {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
}

.legend-item {
display: flex;
align-items: center;
gap: 8px;
}

.legend-color {
width: 12px;
height: 12px;
background: #4CAF50;
border-radius: 2px;
}

.chart-tooltip {
position: absolute;
background: rgba(0, 0, 0, 0.8);
color: white;
padding: 8px 12px;
border-radius: 4px;
font-size: 12px;
pointer-events: none;
z-index: 1000;
white-space: nowrap;
}

.loading-spinner {
width: 40px;
height: 40px;
margin: 0 auto 10px;
border: 3px solid #f3f3f3;
border-top: 3px solid #4CAF50;
border-radius: 50%;
animation: spin 1s linear infinite;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.portfolio-chart.loading,
.portfolio-chart.error,
.portfolio-chart.empty {
text-align: center;
padding: 60px 20px;
color: #666;
}

.portfolio-chart.error {
color: #f44336;
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
.portfolio-chart {
padding: 10px;
}

.range-picker button {
padding: 4px 8px;
font-size: 12px;
}

.chart-tooltip {
font-size: 10px;
padding: 4px 8px;
}
}
Loading
Loading