浏览代码

style: 优化图例标题样式更醒目

- 标题改为:点形状: 点颜色: 边:
- 标题用红色背景+白字,更醒目
- 图例文字改为白色(#fff),更清晰
- 字体稍大(11px),更易读

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
yangxiaohui 4 天之前
父节点
当前提交
876bd0ce5f
共有 1 个文件被更改,包括 11 次插入8 次删除
  1. 11 8
      script/data_processing/visualize_match_graph.py

+ 11 - 8
script/data_processing/visualize_match_graph.py

@@ -117,17 +117,20 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
             border-radius: 4px;
         }}
         .top-legend-title {{
-            color: #e94560;
+            color: #fff;
             font-size: 11px;
             font-weight: bold;
-            margin-right: 2px;
+            background: #e94560;
+            padding: 2px 6px;
+            border-radius: 3px;
+            margin-right: 6px;
         }}
         .top-legend-item {{
             display: flex;
             align-items: center;
-            font-size: 10px;
-            color: #ccc;
-            gap: 3px;
+            font-size: 11px;
+            color: #fff;
+            gap: 4px;
         }}
         .top-legend-circle {{
             width: 10px;
@@ -991,12 +994,12 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
             </div>
             <div class="top-legend">
                 <div class="top-legend-group">
-                    <span class="top-legend-title">形状</span>
+                    <span class="top-legend-title">形状:</span>
                     <div class="top-legend-item"><div class="top-legend-circle" style="background:#888;"></div>标签</div>
                     <div class="top-legend-item"><div class="top-legend-square" style="background:#888;"></div>分类</div>
                 </div>
                 <div class="top-legend-group">
-                    <span class="top-legend-title">颜色</span>
+                    <span class="top-legend-title">颜色:</span>
                     <div class="top-legend-item"><div class="top-legend-circle" style="background:#f39c12;"></div>灵感</div>
                     <div class="top-legend-item"><div class="top-legend-circle" style="background:#3498db;"></div>目的</div>
                     <div class="top-legend-item"><div class="top-legend-circle" style="background:#9b59b6;"></div>关键</div>
@@ -1004,7 +1007,7 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
                     <div class="top-legend-item"><div class="top-legend-circle" style="background:#2ecc71;"></div>人设</div>
                 </div>
                 <div class="top-legend-group">
-                    <span class="top-legend-title">边</span>
+                    <span class="top-legend-title">边:</span>
                     <div class="top-legend-item"><div class="top-legend-line" style="background:#e94560;"></div>相同</div>
                     <div class="top-legend-item"><div class="top-legend-line dashed" style="border-color:#e94560;"></div>相似</div>
                     <div class="top-legend-divider"></div>