feat(reports): implement reports page and data visualization components
Implement a comprehensive reports dashboard including user question summaries, AI performance metrics, and usage trends. This includes the creation of several reusable chart components and supporting services. - Add `ReportsPage` with tabbed navigation for questions and performance - Implement `ReportsService` with mock data support for rapid development - Create reusable UI components: `BarChartComponent`, `DoughnutChartComponent`, and `LineChartComponent` - Add `format.util.ts` for Persian digit and number formatting - Integrate 'Lahze' font family and add font assets - Add unit tests for `ReportsPage` and `ReportsService`
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
.line-chart {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.line-svg {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.line-grid line {
|
||||
stroke: var(--line-grid-color, rgba(100, 116, 139, 0.18));
|
||||
stroke-width: 1;
|
||||
stroke-dasharray: 4 6;
|
||||
}
|
||||
|
||||
.line-tick-label {
|
||||
font-size: 6px;
|
||||
fill: var(--text-muted);
|
||||
}
|
||||
|
||||
.line-x-label {
|
||||
font-size: 6px;
|
||||
fill: var(--text-muted);
|
||||
}
|
||||
|
||||
.line-area {
|
||||
animation: areaFade 0.8s ease-out both;
|
||||
}
|
||||
|
||||
.line-path {
|
||||
stroke-dasharray: 2000;
|
||||
animation: lineDraw 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
|
||||
}
|
||||
|
||||
.line-hit-area {
|
||||
fill: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.line-point {
|
||||
fill: var(--surface-bg);
|
||||
stroke: var(--color-primary);
|
||||
stroke-width: 2;
|
||||
transition: r 0.15s ease;
|
||||
}
|
||||
|
||||
.line-point-active {
|
||||
r: 4;
|
||||
fill: var(--color-primary);
|
||||
}
|
||||
|
||||
.line-guide {
|
||||
stroke: var(--color-primary);
|
||||
stroke-width: 1.5;
|
||||
stroke-dasharray: 3 4;
|
||||
opacity: 0.7;
|
||||
animation: fadeIn 0.15s ease-out;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
position: absolute;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.15rem;
|
||||
min-width: max-content;
|
||||
padding: 0.55rem 0.75rem;
|
||||
border: 1px solid var(--card-border);
|
||||
border-radius: 0.75rem;
|
||||
background: var(--surface-bg);
|
||||
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
|
||||
transform: translate(50%, -110%);
|
||||
pointer-events: none;
|
||||
animation: fadeIn 0.15s ease-out;
|
||||
}
|
||||
|
||||
.chart-tooltip-title {
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.chart-tooltip-row {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.chart-empty {
|
||||
padding: 2.5rem 1rem;
|
||||
text-align: center;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@keyframes lineDraw {
|
||||
from {
|
||||
stroke-dashoffset: 2000;
|
||||
}
|
||||
to {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes areaFade {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.line-path,
|
||||
.line-area {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
:host-context([data-bs-theme='dark']) .line-grid line {
|
||||
stroke: rgba(148, 163, 184, 0.2);
|
||||
}
|
||||
|
||||
:host-context([data-bs-theme='dark']) .chart-tooltip {
|
||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
Reference in New Issue
Block a user