Add 10 advanced stats charts (#2850)
* Add 10 advanced stats charts with new API endpoints and visualizations * Fix chart rendering and visual readability across all new stats charts * Remove 6 charts, fix session archetypes outliers, make book flow half-width * Revert book flow to full width * Remove avg rating from book flow chart, reorder charts, cleanup unused imports
This commit is contained in:
@@ -70,6 +70,12 @@ export interface CompletionRaceResponse {
|
||||
endProgress: number;
|
||||
}
|
||||
|
||||
export interface SessionScatterResponse {
|
||||
hourOfDay: number;
|
||||
durationMinutes: number;
|
||||
dayOfWeek: number;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -152,4 +158,11 @@ export class UserStatsService {
|
||||
`${this.readingSessionsUrl}/reading-dates`
|
||||
);
|
||||
}
|
||||
|
||||
getSessionScatter(year: number): Observable<SessionScatterResponse[]> {
|
||||
return this.http.get<SessionScatterResponse[]>(
|
||||
`${this.readingSessionsUrl}/session-scatter`,
|
||||
{params: {year: year.toString()}}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user