From 036e360e0dab0618165f52cc1c36e4c2f41e1887 Mon Sep 17 00:00:00 2001 From: s5260822 Date: Thu, 20 Mar 2025 21:37:17 +0100 Subject: [PATCH] rearranged charts to 2x2 grid --- src/main/resources/static/index.css | 22 +++++++ src/main/resources/templates/nlp.ftl | 66 +++++++++++-------- src/main/resources/templates/posBarChart.ftl | 2 +- .../templates/sentimentsRadarChart.ftl | 2 +- .../resources/templates/topicsBubbleChart.ftl | 2 +- 5 files changed, 62 insertions(+), 32 deletions(-) diff --git a/src/main/resources/static/index.css b/src/main/resources/static/index.css index 94d0436..84f99c5 100644 --- a/src/main/resources/static/index.css +++ b/src/main/resources/static/index.css @@ -266,3 +266,25 @@ tbody tr:hover { select { min-width: 200px; } + +.chart-container { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr)); + grid-template-rows: repeat(2, 1fr); + gap: 10px; + width: 100%; +} + +.chart { + background-color: lightgray; + padding: 30px; + text-align: center; + border: 1px solid #ccc; + border-radius: 10px; + height: 800px; +} + +.chart-svg { + transform: scale(0.9); + z-index: 1; +} diff --git a/src/main/resources/templates/nlp.ftl b/src/main/resources/templates/nlp.ftl index 491c488..0f0b3a1 100644 --- a/src/main/resources/templates/nlp.ftl +++ b/src/main/resources/templates/nlp.ftl @@ -1,32 +1,40 @@ - <#if s.nlp.topics??> -

Topics Information (als Bubble Chart)

- <#assign condenseTopicInformation = s.nlp.topics> - <#include "topicsBubbleChart.ftl"> - <#else> -

Keine Topics Information für diese Rede verfügbar

- +
+
+ <#if s.nlp.topics??> +

Topics Information (als Bubble Chart)

+ <#assign condenseTopicInformation = s.nlp.topics> + <#include "topicsBubbleChart.ftl"> + <#else> +

Keine Topics Information für diese Rede verfügbar

+ +
- <#if s.nlp.posList??> -

POS Information (als Bar Chart)

- <#assign posList = s.nlp.posList> - <#include "posBarChart.ftl"> - <#else> -

Keine POS Information verfügbar für diese Rede verfügbar

- +
+ <#if s.nlp.posList??> +

POS Information (als Bar Chart)

+ <#assign posList = s.nlp.posList> + <#include "posBarChart.ftl"> + <#else> +

Keine POS Information verfügbar für diese Rede verfügbar

+ +
+
+ <#if sentiment??> +

Sentiments Information (als Radar Chart)

+ <#include "sentimentsRadarChart.ftl"> + <#else> +

Keine Sentiments Information für diese Rede verfügbar

+ +
- <#if sentiment??> -

Sentiments Information (als Radar Chart)

- <#include "sentimentsRadarChart.ftl"> - <#else> -

Keine Sentiments Information für diese Rede verfügbar

- - - - <#if s.nlp.namedEntities??> -

Named Entities Information (als Sunburst Chart)

- <#assign nea = s.nlp.namedEntities> - <#include "namedEntitiesSunburstChart.ftl"> - <#else> -

Keine Named Entities Information für diese Rede verfügbar

- \ No newline at end of file +
+ <#if s.nlp.namedEntities??> +

Named Entities Information (als Sunburst Chart)

+ <#assign nea = s.nlp.namedEntities> + <#include "namedEntitiesSunburstChart.ftl"> + <#else> +

Keine Named Entities Information für diese Rede verfügbar

+ +
+
\ No newline at end of file diff --git a/src/main/resources/templates/posBarChart.ftl b/src/main/resources/templates/posBarChart.ftl index 26c3e36..08b2972 100644 --- a/src/main/resources/templates/posBarChart.ftl +++ b/src/main/resources/templates/posBarChart.ftl @@ -1,4 +1,4 @@ - +