mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
fix(pdf): 活动图表
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{% for item in chart_data %}
|
||||
<div class="hour-bar-container">
|
||||
<div class="hour-label">{{ "%02d" | format(item.hour) }}:00</div>
|
||||
<div class="bar-wrapper">
|
||||
<div class="bar" style="width: {{ item.percentage }}%;">
|
||||
{% if item.percentage > 15 %}
|
||||
<span class="hourly-value-inside">{{ item.count }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.percentage <= 15 %} <span class="hourly-value-outside">{{ item.count }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% if chart_data %}
|
||||
{% for item in chart_data %}
|
||||
<div class="activity-col">
|
||||
<span class="activity-val-top">{{ item.count }}</span>
|
||||
<div class="activity-bar-v" style="--h:{{ "%.2f"|format(item.percentage) }}%;"></div>
|
||||
<span class="activity-tick">{{ "%02d"|format(item.hour) }}:00</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="activity-col" style="flex:1; justify-content: center; height: 100px;">
|
||||
<div class="comment">// NO_DATA_STREAM</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% if chart_data %}
|
||||
<div class="activity-container">
|
||||
{% for item in chart_data %}
|
||||
<div class="activity-col">
|
||||
<span class="activity-col-count">{{ item.count }}</span>
|
||||
<div class="activity-bar-vertical" style="--h: {{ "%.2f"|format(item.percentage) }}%;"></div>
|
||||
<span class="activity-label-hour">{{ "%02d"|format(item.hour) }}:00</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="activity-col" style="flex:1; justify-content: center; height: 100px;">
|
||||
<div class="topic-meta">NO_DATA_AVAILABLE_FOR_ACTIVITY_SPECTRUM</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,11 @@
|
||||
<div style="display: flex; flex-direction: column; gap: 5px;">
|
||||
{% for item in chart_data %}
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="width: 50px;">{{ "%02d" | format(item.hour) }}:00</span>
|
||||
<div style="background-color: #eee; flex-grow: 1; height: 10px;">
|
||||
<div style="width: {{ item.percentage }}%; background-color: blue; height: 100%;"></div>
|
||||
</div>
|
||||
<span style="width: 30px; text-align: right;">{{ item.count }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
{% if chart_data %}
|
||||
<div class="sf-chart-container"
|
||||
style="display: flex; height: 260px; align-items: flex-end; justify-content: space-around; width: 100%; padding-bottom: 40px; box-sizing: border-box;">
|
||||
{% for item in chart_data %}
|
||||
<div class="sf-chart-col"
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; position: relative;">
|
||||
<!-- 数值显示 -->
|
||||
<div class="sf-chart-val"
|
||||
style="font-size: 10px; font-weight: bold; color: #b71c1c; margin-bottom: 4px; font-family: sans-serif;">
|
||||
{{ item.count if item.count > 0 else '' }}
|
||||
</div>
|
||||
|
||||
<!-- 图表柱体 -->
|
||||
<div class="sf-chart-bar" style="
|
||||
width: 70%;
|
||||
height: {{ item.percentage }}%;
|
||||
background: linear-gradient(to top, #b71c1c, #ffca28);
|
||||
border-radius: 4px 4px 0 0;
|
||||
box-shadow: 0 0 12px rgba(183, 28, 28, 0.3);
|
||||
border: 1px solid rgba(255, 202, 40, 0.4);
|
||||
min-height: {{ '2px' if item.count > 0 else '0px' }};
|
||||
"></div>
|
||||
|
||||
<!-- 刻度文字 -->
|
||||
<div class="sf-chart-tick" style="
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
font-size: 10px;
|
||||
color: #3e2723;
|
||||
white-space: nowrap;
|
||||
transform: rotate(-45deg);
|
||||
font-weight: bold;
|
||||
">
|
||||
{{ "%02d"|format(item.hour) }}:00
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div
|
||||
style="display:flex; align-items:center; justify-content:center; height: 200px; width: 100%; color: #888; font-style: italic;">
|
||||
🏮 尚无活跃记录 🏮
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user