integrate wordcloud view in timeline
This commit is contained in:
+299
-275
@@ -49,10 +49,17 @@
|
||||
(click)="setTimelineViewMode('compact')">
|
||||
Kompakt
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
[class.active]="timelineViewMode === 'wordcloud'"
|
||||
(click)="setTimelineViewMode('wordcloud')">
|
||||
Wordcloud
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="hasYearRange"
|
||||
*ngIf="timelineViewMode !== 'wordcloud' && hasYearRange"
|
||||
class="year-filter"
|
||||
aria-label="Zeitraum eingrenzen">
|
||||
<div class="year-filter-top">
|
||||
@@ -103,311 +110,328 @@
|
||||
<span>{{ maxYear }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="timelineViewMode === 'wordcloud'"
|
||||
class="year-filter"
|
||||
aria-label="Anzahl angezeigter Themen">
|
||||
<ng-content select="[timeline-wordcloud-controls]"></ng-content>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="loading"
|
||||
class="timeline-state timeline-state-loading"
|
||||
aria-live="polite">
|
||||
<mat-spinner diameter="36"></mat-spinner>
|
||||
<span>Forschungstimeline wird geladen ...</span>
|
||||
</div>
|
||||
<ng-container *ngIf="timelineViewMode === 'wordcloud'; else timelineViews">
|
||||
<ng-content select="[timeline-wordcloud-content]"></ng-content>
|
||||
</ng-container>
|
||||
|
||||
<div
|
||||
*ngIf="!loading && loadFailed"
|
||||
class="timeline-state timeline-state-error">
|
||||
Forschungstimeline konnte nicht geladen werden.
|
||||
</div>
|
||||
<ng-template #timelineViews>
|
||||
<div
|
||||
*ngIf="loading"
|
||||
class="timeline-state timeline-state-loading"
|
||||
aria-live="polite">
|
||||
<mat-spinner diameter="36"></mat-spinner>
|
||||
<span>Forschungstimeline wird geladen ...</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="!loading && !loadFailed">
|
||||
<ng-container *ngIf="timelineItems.length > 0; else emptyTimeline">
|
||||
<ng-container *ngIf="timelineViewMode === 'years'; else compactTimeline">
|
||||
<div #timelineWrapper class="timeline-wrapper">
|
||||
<div class="timeline-inner" [style.min-width.px]="timelineMinWidth">
|
||||
<div class="timeline-axis" aria-hidden="true"></div>
|
||||
<div
|
||||
*ngIf="!loading && loadFailed"
|
||||
class="timeline-state timeline-state-error">
|
||||
Forschungstimeline konnte nicht geladen werden.
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="timeline-points"
|
||||
[style.grid-template-columns]="gridTemplateColumns">
|
||||
<div
|
||||
*ngIf="showEarlierYearsControl"
|
||||
class="timeline-point timeline-load-more-point">
|
||||
<button
|
||||
type="button"
|
||||
class="year-button"
|
||||
[disabled]="loadingEarlierYears"
|
||||
(click)="requestEarlierYears()"
|
||||
aria-label="Frühere Jahre der Forschungstimeline laden">
|
||||
‹
|
||||
</button>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
<ng-container *ngIf="!loading && !loadFailed">
|
||||
<ng-container *ngIf="timelineItems.length > 0; else emptyTimeline">
|
||||
<ng-container
|
||||
*ngIf="timelineViewMode === 'years'; else compactTimeline">
|
||||
<div #timelineWrapper class="timeline-wrapper">
|
||||
<div class="timeline-inner" [style.min-width.px]="timelineMinWidth">
|
||||
<div class="timeline-axis" aria-hidden="true"></div>
|
||||
|
||||
<div
|
||||
*ngFor="
|
||||
let item of timelineItems;
|
||||
let index = index;
|
||||
trackBy: trackByYear
|
||||
"
|
||||
class="timeline-point"
|
||||
[ngClass]="getColorClass(index)">
|
||||
<button
|
||||
type="button"
|
||||
class="year-button"
|
||||
(click)="selectYears([item.year])"
|
||||
[attr.aria-label]="
|
||||
'Publikationen aus dem Jahr ' + item.year + ' anzeigen'
|
||||
">
|
||||
{{ item.year }}
|
||||
</button>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="timeline-content"
|
||||
[style.grid-template-columns]="gridTemplateColumns">
|
||||
<article
|
||||
*ngIf="showEarlierYearsControl"
|
||||
class="timeline-item timeline-load-more-item">
|
||||
<h3>
|
||||
class="timeline-points"
|
||||
[style.grid-template-columns]="gridTemplateColumns">
|
||||
<div
|
||||
*ngIf="showEarlierYearsControl"
|
||||
class="timeline-point timeline-load-more-point">
|
||||
<button
|
||||
type="button"
|
||||
class="load-more-action-button"
|
||||
class="year-button"
|
||||
[disabled]="loadingEarlierYears"
|
||||
(click)="requestEarlierYears()">
|
||||
<span class="load-more-content">
|
||||
<mat-spinner
|
||||
*ngIf="loadingEarlierYears"
|
||||
diameter="18"></mat-spinner>
|
||||
<span>{{ earlierYearsLabel }}</span>
|
||||
</span>
|
||||
(click)="requestEarlierYears()"
|
||||
aria-label="Frühere Jahre der Forschungstimeline laden">
|
||||
‹
|
||||
</button>
|
||||
</h3>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
|
||||
<span
|
||||
*ngIf="earlierYearsLoadFailed && !loadingEarlierYears"
|
||||
class="no-topics">
|
||||
Laden fehlgeschlagen.
|
||||
</span>
|
||||
</article>
|
||||
|
||||
<article
|
||||
*ngFor="
|
||||
let item of timelineItems;
|
||||
let index = index;
|
||||
trackBy: trackByYear
|
||||
"
|
||||
class="timeline-item"
|
||||
[attr.data-timeline-year]="item.year">
|
||||
<h3>
|
||||
<div
|
||||
*ngFor="
|
||||
let item of timelineItems;
|
||||
let index = index;
|
||||
trackBy: trackByYear
|
||||
"
|
||||
class="timeline-point"
|
||||
[ngClass]="getColorClass(index)">
|
||||
<button
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!getMainTopicItem(item)?.id"
|
||||
(click)="selectTopic(getMainTopicItem(item), [item.year])">
|
||||
{{ getMainTopic(item) }}
|
||||
</button>
|
||||
</h3>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="publication-count publication-count-button"
|
||||
(click)="selectYears([item.year])">
|
||||
{{ item.publication_count }}
|
||||
{{
|
||||
item.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
|
||||
<div class="topic-list">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
getDisplayedTopics(item).length > 0;
|
||||
else noTopicsForYear
|
||||
class="year-button"
|
||||
(click)="selectYears([item.year])"
|
||||
[attr.aria-label]="
|
||||
'Publikationen aus dem Jahr ' + item.year + ' anzeigen'
|
||||
">
|
||||
{{ item.year }}
|
||||
</button>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="timeline-content"
|
||||
[style.grid-template-columns]="gridTemplateColumns">
|
||||
<article
|
||||
*ngIf="showEarlierYearsControl"
|
||||
class="timeline-item timeline-load-more-item">
|
||||
<h3>
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="
|
||||
let topic of getDisplayedTopics(item);
|
||||
trackBy: trackByTopic
|
||||
"
|
||||
class="topic-chip"
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [item.year])">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
class="load-more-action-button"
|
||||
[disabled]="loadingEarlierYears"
|
||||
(click)="requestEarlierYears()">
|
||||
<span class="load-more-content">
|
||||
<mat-spinner
|
||||
*ngIf="loadingEarlierYears"
|
||||
diameter="18"></mat-spinner>
|
||||
<span>{{ earlierYearsLabel }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
</h3>
|
||||
|
||||
<ng-template #noTopicsForYear>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
</div>
|
||||
</article>
|
||||
<span
|
||||
*ngIf="earlierYearsLoadFailed && !loadingEarlierYears"
|
||||
class="no-topics">
|
||||
Laden fehlgeschlagen.
|
||||
</span>
|
||||
</article>
|
||||
|
||||
<article
|
||||
*ngFor="
|
||||
let item of timelineItems;
|
||||
let index = index;
|
||||
trackBy: trackByYear
|
||||
"
|
||||
class="timeline-item"
|
||||
[attr.data-timeline-year]="item.year">
|
||||
<h3>
|
||||
<button
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!getMainTopicItem(item)?.id"
|
||||
(click)="
|
||||
selectTopic(getMainTopicItem(item), [item.year])
|
||||
">
|
||||
{{ getMainTopic(item) }}
|
||||
</button>
|
||||
</h3>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="publication-count publication-count-button"
|
||||
(click)="selectYears([item.year])">
|
||||
{{ item.publication_count }}
|
||||
{{
|
||||
item.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
|
||||
<div class="topic-list">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
getDisplayedTopics(item).length > 0;
|
||||
else noTopicsForYear
|
||||
">
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="
|
||||
let topic of getDisplayedTopics(item);
|
||||
trackBy: trackByTopic
|
||||
"
|
||||
class="topic-chip"
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [item.year])">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #noTopicsForYear>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #compactTimeline>
|
||||
<div class="compact-phase-list">
|
||||
<article
|
||||
*ngFor="
|
||||
let phase of compactPhases;
|
||||
let index = index;
|
||||
trackBy: trackByPhase
|
||||
"
|
||||
class="phase-card"
|
||||
[ngClass]="getColorClass(index)">
|
||||
<div class="phase-card-header">
|
||||
<span class="phase-marker"></span>
|
||||
<ng-template #compactTimeline>
|
||||
<div class="compact-phase-list">
|
||||
<article
|
||||
*ngFor="
|
||||
let phase of compactPhases;
|
||||
let index = index;
|
||||
trackBy: trackByPhase
|
||||
"
|
||||
class="phase-card"
|
||||
[ngClass]="getColorClass(index)">
|
||||
<div class="phase-card-header">
|
||||
<span class="phase-marker"></span>
|
||||
|
||||
<div class="phase-title-block">
|
||||
<div class="phase-meta-row">
|
||||
<button
|
||||
type="button"
|
||||
class="phase-years phase-years-button"
|
||||
(click)="selectYears(getPhaseYears(phase))"
|
||||
[attr.aria-label]="
|
||||
'Publikationen im Zeitraum ' +
|
||||
getPhaseYearLabel(phase) +
|
||||
' anzeigen'
|
||||
">
|
||||
{{ getPhaseYearLabel(phase) }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="phase-publications phase-publications-button"
|
||||
(click)="selectYears(getPhaseYears(phase))">
|
||||
{{ phase.publication_count }}
|
||||
{{
|
||||
phase.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<button
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!phase.primaryTopic.id"
|
||||
(click)="
|
||||
selectTopic(phase.primaryTopic, getPhaseYears(phase))
|
||||
">
|
||||
{{ phase.primaryTopicName }}
|
||||
</button>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="phase-topics">
|
||||
<ng-container *ngIf="phase.topics.length > 0; else noPhaseTopics">
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="let topic of phase.topics; trackBy: trackByTopic"
|
||||
class="topic-chip"
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, getPhaseYears(phase))">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #noPhaseTopics>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="phase-toggle"
|
||||
[attr.aria-expanded]="isPhaseExpanded(phase)"
|
||||
(click)="togglePhase(phase)">
|
||||
{{
|
||||
isPhaseExpanded(phase)
|
||||
? 'Details ausblenden'
|
||||
: 'Details anzeigen'
|
||||
}}
|
||||
</button>
|
||||
|
||||
<div *ngIf="isPhaseExpanded(phase)" class="phase-year-details">
|
||||
<div
|
||||
*ngFor="let year of phase.years; trackBy: trackByYear"
|
||||
class="phase-year-row">
|
||||
<div class="phase-year-meta">
|
||||
<button
|
||||
type="button"
|
||||
class="phase-year-button"
|
||||
(click)="selectYears([year.year])"
|
||||
[attr.aria-label]="
|
||||
'Publikationen aus dem Jahr ' + year.year + ' anzeigen'
|
||||
">
|
||||
{{ year.year }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="phase-year-publication-button"
|
||||
(click)="selectYears([year.year])">
|
||||
{{ year.publication_count }}
|
||||
{{
|
||||
year.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="phase-year-topics">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
getDisplayedTopicsForPrimaryTopic(
|
||||
year,
|
||||
phase.primaryTopicName
|
||||
).length > 0;
|
||||
else noPhaseYearTopics
|
||||
">
|
||||
<div class="phase-title-block">
|
||||
<div class="phase-meta-row">
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="
|
||||
let topic of getDisplayedTopicsForPrimaryTopic(
|
||||
year,
|
||||
phase.primaryTopicName
|
||||
);
|
||||
trackBy: trackByTopic
|
||||
"
|
||||
class="mini-topic-chip"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [year.year])">
|
||||
<span>{{ topic.name }}</span>
|
||||
<strong>{{ topic.count }}</strong>
|
||||
class="phase-years phase-years-button"
|
||||
(click)="selectYears(getPhaseYears(phase))"
|
||||
[attr.aria-label]="
|
||||
'Publikationen im Zeitraum ' +
|
||||
getPhaseYearLabel(phase) +
|
||||
' anzeigen'
|
||||
">
|
||||
{{ getPhaseYearLabel(phase) }}
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #noPhaseYearTopics>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
<button
|
||||
type="button"
|
||||
class="phase-publications phase-publications-button"
|
||||
(click)="selectYears(getPhaseYears(phase))">
|
||||
{{ phase.publication_count }}
|
||||
{{
|
||||
phase.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<button
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!phase.primaryTopic.id"
|
||||
(click)="
|
||||
selectTopic(phase.primaryTopic, getPhaseYears(phase))
|
||||
">
|
||||
{{ phase.primaryTopicName }}
|
||||
</button>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div class="timeline-note">
|
||||
<span class="note-dot"></span>
|
||||
<span> Hauptforschungsschwerpunkte im jeweiligen Zeitraum </span>
|
||||
</div>
|
||||
<div class="phase-topics">
|
||||
<ng-container
|
||||
*ngIf="phase.topics.length > 0; else noPhaseTopics">
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="let topic of phase.topics; trackBy: trackByTopic"
|
||||
class="topic-chip"
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, getPhaseYears(phase))">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #noPhaseTopics>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="phase-toggle"
|
||||
[attr.aria-expanded]="isPhaseExpanded(phase)"
|
||||
(click)="togglePhase(phase)">
|
||||
{{
|
||||
isPhaseExpanded(phase)
|
||||
? 'Details ausblenden'
|
||||
: 'Details anzeigen'
|
||||
}}
|
||||
</button>
|
||||
|
||||
<div *ngIf="isPhaseExpanded(phase)" class="phase-year-details">
|
||||
<div
|
||||
*ngFor="let year of phase.years; trackBy: trackByYear"
|
||||
class="phase-year-row">
|
||||
<div class="phase-year-meta">
|
||||
<button
|
||||
type="button"
|
||||
class="phase-year-button"
|
||||
(click)="selectYears([year.year])"
|
||||
[attr.aria-label]="
|
||||
'Publikationen aus dem Jahr ' + year.year + ' anzeigen'
|
||||
">
|
||||
{{ year.year }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="phase-year-publication-button"
|
||||
(click)="selectYears([year.year])">
|
||||
{{ year.publication_count }}
|
||||
{{
|
||||
year.publication_count === 1
|
||||
? 'Publikation'
|
||||
: 'Publikationen'
|
||||
}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="phase-year-topics">
|
||||
<ng-container
|
||||
*ngIf="
|
||||
getDisplayedTopicsForPrimaryTopic(
|
||||
year,
|
||||
phase.primaryTopicName
|
||||
).length > 0;
|
||||
else noPhaseYearTopics
|
||||
">
|
||||
<button
|
||||
type="button"
|
||||
*ngFor="
|
||||
let topic of getDisplayedTopicsForPrimaryTopic(
|
||||
year,
|
||||
phase.primaryTopicName
|
||||
);
|
||||
trackBy: trackByTopic
|
||||
"
|
||||
class="mini-topic-chip"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [year.year])">
|
||||
<span>{{ topic.name }}</span>
|
||||
<strong>{{ topic.count }}</strong>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #noPhaseYearTopics>
|
||||
<span class="no-topics"> Keine weiteren Topics </span>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div class="timeline-note">
|
||||
<span class="note-dot"></span>
|
||||
<span> Hauptforschungsschwerpunkte im jeweiligen Zeitraum </span>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #emptyTimeline>
|
||||
<div class="timeline-state">Keine Timeline-Daten vorhanden.</div>
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ export interface TopicTimelineElement {
|
||||
primary_topics?: TopicTimelineTopic[];
|
||||
}
|
||||
|
||||
export type TimelineViewMode = 'years' | 'compact';
|
||||
export type TimelineViewMode = 'years' | 'compact' | 'wordcloud';
|
||||
|
||||
export interface TimelineYearRange {
|
||||
startYear: number;
|
||||
@@ -717,7 +717,7 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
}
|
||||
|
||||
private isTimelineViewMode(value: string): value is TimelineViewMode {
|
||||
return value === 'years' || value === 'compact';
|
||||
return value === 'years' || value === 'compact' || value === 'wordcloud';
|
||||
}
|
||||
|
||||
private isValidYear(value: number | undefined): value is number {
|
||||
|
||||
@@ -13,31 +13,31 @@
|
||||
(yearRangeChange)="onTimelineYearRangeChange($event)"
|
||||
(topicSelect)="onTimelineTopicSelect($event)"
|
||||
(yearSelect)="onTimelineYearSelect($event)"
|
||||
(loadEarlierYears)="onTimelineLoadEarlierYears()"></app-research-timeline>
|
||||
(loadEarlierYears)="onTimelineLoadEarlierYears()">
|
||||
<div timeline-wordcloud-controls class="word-cloud-slider-wrapper">
|
||||
@if (loadingWordCloud) {
|
||||
<span class="slider-label">Themen laden ...</span>
|
||||
} @else if (wordCloudOptions && sliderMax > 5) {
|
||||
<span class="slider-label">{{ topN }} Themen</span>
|
||||
<div class="word-cloud-slider" [style.--range-value]="sliderPercent">
|
||||
<div class="range-track"></div>
|
||||
<input
|
||||
type="range"
|
||||
[min]="5"
|
||||
[max]="sliderMax"
|
||||
[value]="topN"
|
||||
(input)="onTopNChange($event)"
|
||||
aria-label="Anzahl der angezeigten Themen" />
|
||||
</div>
|
||||
} @else {
|
||||
<span class="slider-label">Themen</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (!loadingWordCloud) {
|
||||
<div class="word-cloud-card">
|
||||
<div class="word-cloud-header">
|
||||
<h3 class="word-cloud-title">Forschungsthemen</h3>
|
||||
@if (wordCloudOptions && sliderMax > 5) {
|
||||
<div class="word-cloud-slider-wrapper">
|
||||
<span class="slider-label">{{ topN }} Themen</span>
|
||||
<div
|
||||
class="word-cloud-slider"
|
||||
[style.--range-value]="sliderPercent">
|
||||
<div class="range-track"></div>
|
||||
<input
|
||||
type="range"
|
||||
[min]="5"
|
||||
[max]="sliderMax"
|
||||
[value]="topN"
|
||||
(input)="onTopNChange($event)"
|
||||
aria-label="Anzahl der angezeigten Themen" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (wordCloudOptions) {
|
||||
<div timeline-wordcloud-content class="word-cloud-view">
|
||||
@if (loadingWordCloud) {
|
||||
<div class="word-cloud-state">Forschungsthemen werden geladen ...</div>
|
||||
} @else if (wordCloudOptions) {
|
||||
<div
|
||||
echarts
|
||||
[options]="wordCloudOptions"
|
||||
@@ -47,5 +47,5 @@
|
||||
<p class="word-cloud-empty">Keine Forschungsthemen gefunden.</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</app-research-timeline>
|
||||
</section>
|
||||
|
||||
@@ -5,37 +5,12 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.word-cloud-card {
|
||||
margin-top: 1.5rem;
|
||||
padding: 24px 28px;
|
||||
border: 1px solid #d7e4ff;
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.word-cloud-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.word-cloud-title {
|
||||
margin: 0;
|
||||
font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.word-cloud-slider-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.75rem;
|
||||
flex-shrink: 0;
|
||||
min-height: 86px;
|
||||
}
|
||||
|
||||
.slider-label {
|
||||
@@ -115,15 +90,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
.word-cloud-view {
|
||||
min-height: 420px;
|
||||
}
|
||||
|
||||
.word-cloud-chart {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
height: 420px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.word-cloud-state,
|
||||
.word-cloud-empty {
|
||||
margin: 2rem 0 0.5rem;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
min-height: 420px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -489,7 +489,11 @@ export class PersonOverviewComponent implements OnInit {
|
||||
}
|
||||
|
||||
private parseTimelineViewMode(value: string | null): TimelineViewMode {
|
||||
return value === 'compact' ? 'compact' : 'years';
|
||||
if (value === 'compact' || value === 'wordcloud') {
|
||||
return value;
|
||||
}
|
||||
|
||||
return 'years';
|
||||
}
|
||||
|
||||
private parseOptionalYear(value: string | null): number | undefined {
|
||||
|
||||
Reference in New Issue
Block a user