rearranged charts to 2x2 grid

This commit is contained in:
s5260822 2025-03-20 21:37:17 +01:00
parent 5856b87b25
commit 036e360e0d
5 changed files with 62 additions and 32 deletions

View file

@ -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;
}

View file

@ -1,32 +1,40 @@
<#if s.nlp.topics??>
<h3>Topics Information (als Bubble Chart)</h3>
<#assign condenseTopicInformation = s.nlp.topics>
<#include "topicsBubbleChart.ftl">
<#else>
<h3>Keine Topics Information für diese Rede verfügbar</h3>
</#if>
<div class="chart-container">
<div class="chart">
<#if s.nlp.topics??>
<h3>Topics Information (als Bubble Chart)</h3>
<#assign condenseTopicInformation = s.nlp.topics>
<#include "topicsBubbleChart.ftl">
<#else>
<h3>Keine Topics Information für diese Rede verfügbar</h3>
</#if>
</div>
<#if s.nlp.posList??>
<h3>POS Information (als Bar Chart)</h3>
<#assign posList = s.nlp.posList>
<#include "posBarChart.ftl">
<#else>
<h3>Keine POS Information verfügbar für diese Rede verfügbar</h3>
</#if>
<div class="chart">
<#if s.nlp.posList??>
<h3>POS Information (als Bar Chart)</h3>
<#assign posList = s.nlp.posList>
<#include "posBarChart.ftl">
<#else>
<h3>Keine POS Information verfügbar für diese Rede verfügbar</h3>
</#if>
</div>
<div class="chart">
<#if sentiment??>
<h3>Sentiments Information (als Radar Chart)</h3>
<#include "sentimentsRadarChart.ftl">
<#else>
<h3>Keine Sentiments Information für diese Rede verfügbar</h3>
</#if>
</div>
<#if sentiment??>
<h3>Sentiments Information (als Radar Chart)</h3>
<#include "sentimentsRadarChart.ftl">
<#else>
<h3>Keine Sentiments Information für diese Rede verfügbar</h3>
</#if>
<#if s.nlp.namedEntities??>
<h3>Named Entities Information (als Sunburst Chart)</h3>
<#assign nea = s.nlp.namedEntities>
<#include "namedEntitiesSunburstChart.ftl">
<#else>
<h3>Keine Named Entities Information für diese Rede verfügbar</h3>
</#if>
<div class="chart">
<#if s.nlp.namedEntities??>
<h3>Named Entities Information (als Sunburst Chart)</h3>
<#assign nea = s.nlp.namedEntities>
<#include "namedEntitiesSunburstChart.ftl">
<#else>
<h3>Keine Named Entities Information für diese Rede verfügbar</h3>
</#if>
</div>
</div>

View file

@ -1,4 +1,4 @@
<svg id="posBarchart"></svg>
<svg class="chart-svg" id="posBarchart"></svg>
<script>
// Define variables only in JavaScript

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

View file

@ -1,4 +1,4 @@
<svg id="sentimentsRadarChart"></svg>
<svg class="chart-svg" id="sentimentsRadarChart"></svg>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script>
// Retrieve sentiment values from the passed attribute "sentiment"

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

View file

@ -1,4 +1,4 @@
<svg id="topicsBubblechart"></svg>
<svg class="chart-svg" id="topicsBubblechart"></svg>
<script>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After