fix(wordcloud): merge with older version
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -12,19 +12,11 @@
|
||||
(yearSelect)="onTimelineYearSelect($event)"
|
||||
></app-research-timeline>
|
||||
|
||||
<<<<<<< HEAD
|
||||
@if (!loadingWordCloud) {
|
||||
<div class="word-cloud-card">
|
||||
<div class="word-cloud-header">
|
||||
<h3 class="word-cloud-title">Forschungsthemen</h3>
|
||||
@if (wordCloudOptions && sliderMax > 5) {
|
||||
=======
|
||||
@if (wordCloudOptions) {
|
||||
<div class="word-cloud-card">
|
||||
<div class="word-cloud-header">
|
||||
<h3 class="word-cloud-title">Forschungsthemen</h3>
|
||||
@if (sliderMax > 5) {
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
<div class="word-cloud-slider-wrapper">
|
||||
<span class="slider-label">{{ topN }} Themen</span>
|
||||
<div class="word-cloud-slider" [style.--range-value]="sliderPercent">
|
||||
@@ -41,7 +33,6 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
@if (wordCloudOptions) {
|
||||
<div
|
||||
echarts
|
||||
@@ -52,14 +43,6 @@
|
||||
} @else if (wordCloudEmpty) {
|
||||
<p class="word-cloud-empty">Keine Forschungsthemen gefunden.</p>
|
||||
}
|
||||
=======
|
||||
<div
|
||||
echarts
|
||||
[options]="wordCloudOptions"
|
||||
(chartClick)="onWordClick($event)"
|
||||
class="word-cloud-chart"
|
||||
></div>
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
cursor: pointer;
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
|
||||
.word-cloud-empty {
|
||||
@@ -123,6 +122,4 @@
|
||||
text-align: center;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
=======
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,11 +43,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
timelineEndYear: number | undefined;
|
||||
|
||||
wordCloudOptions: EChartsOption | null = null;
|
||||
<<<<<<< HEAD
|
||||
loadingWordCloud = false;
|
||||
wordCloudEmpty = false;
|
||||
=======
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
|
||||
topN = 30;
|
||||
sliderMax = 50;
|
||||
@@ -66,12 +63,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
name: string;
|
||||
value: number;
|
||||
topicId: string | undefined;
|
||||
<<<<<<< HEAD
|
||||
textStyle: { color: string; fontSize: number };
|
||||
emphasis: { textStyle: { fontSize: number; color: string; shadowBlur: number; shadowColor: string } };
|
||||
=======
|
||||
textStyle: { color: string };
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
}> = [];
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -223,22 +216,16 @@ export class PersonOverviewComponent implements OnInit {
|
||||
private loadWordCloud(authorId: string): void {
|
||||
if (!authorId || authorId === '0') {
|
||||
this.wordCloudOptions = null;
|
||||
<<<<<<< HEAD
|
||||
this.wordCloudEmpty = false;
|
||||
this.loadingWordCloud = false;
|
||||
=======
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
this.allTopicData = [];
|
||||
return;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
this.loadingWordCloud = true;
|
||||
this.wordCloudEmpty = false;
|
||||
this.wordCloudOptions = null;
|
||||
|
||||
=======
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
this.worksService
|
||||
.getAuthorWorks(authorId, 1, 100)
|
||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||
@@ -258,7 +245,6 @@ export class PersonOverviewComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
const allValues = Array.from(counts.values());
|
||||
const minVal = Math.min(...allValues);
|
||||
const maxVal = Math.max(...allValues);
|
||||
@@ -293,18 +279,6 @@ export class PersonOverviewComponent implements OnInit {
|
||||
this.wordCloudEmpty = true;
|
||||
return;
|
||||
}
|
||||
=======
|
||||
this.allTopicData = Array.from(counts.entries())
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.map(([name, value]) => ({
|
||||
name,
|
||||
value,
|
||||
topicId: nameToId.get(name),
|
||||
textStyle: { color: this.topicColor(name) },
|
||||
}));
|
||||
|
||||
if (this.allTopicData.length === 0) return;
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
|
||||
this.sliderMax = Math.min(50, this.allTopicData.length);
|
||||
this.topN = Math.min(30, this.sliderMax);
|
||||
@@ -313,11 +287,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Word cloud could not be loaded.', error);
|
||||
<<<<<<< HEAD
|
||||
this.loadingWordCloud = false;
|
||||
this.wordCloudEmpty = true;
|
||||
=======
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -329,10 +300,6 @@ export class PersonOverviewComponent implements OnInit {
|
||||
this.wordCloudOptions = {
|
||||
series: [{
|
||||
type: 'wordCloud',
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
sizeRange: [12, 32],
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
rotationRange: [0, 0],
|
||||
rotationStep: 0,
|
||||
gridSize: 4,
|
||||
@@ -340,16 +307,6 @@ export class PersonOverviewComponent implements OnInit {
|
||||
height: '100%',
|
||||
drawOutOfBound: false,
|
||||
textStyle: { fontFamily: 'Open Sans, sans-serif', fontWeight: 'bold' },
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
emphasis: {
|
||||
textStyle: {
|
||||
shadowBlur: 14,
|
||||
shadowColor: 'rgba(0, 87, 255, 0.45)',
|
||||
color: '#0044cc',
|
||||
},
|
||||
},
|
||||
>>>>>>> c9601b06a2bbedbb1f43ee941e4b5cbc42d93bd1
|
||||
data,
|
||||
}],
|
||||
} as any;
|
||||
|
||||
Reference in New Issue
Block a user