koishi-plugin-chat-analyse 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +19 -17
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1487,22 +1487,24 @@ var Renderer = class {
|
|
|
1487
1487
|
__name(this, "Renderer");
|
|
1488
1488
|
}
|
|
1489
1489
|
COLOR_PALETTES = [
|
|
1490
|
-
//
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
//
|
|
1501
|
-
["#
|
|
1502
|
-
//
|
|
1503
|
-
["#
|
|
1504
|
-
//
|
|
1505
|
-
["#
|
|
1490
|
+
// --- 4组近似色 ---
|
|
1491
|
+
// 1. Oceanic Blues: 更深邃、专业的蓝色系
|
|
1492
|
+
["#A9D6E5", "#89C2D9", "#61A5C2", "#2A6F97", "#012A4A"],
|
|
1493
|
+
// 2. Forest Greens: 丰富、饱和的绿色系
|
|
1494
|
+
["#ADDDBC", "#80C9A7", "#52B69A", "#34A0A4", "#168AAD"],
|
|
1495
|
+
// 3. Royal Purples: 优雅、浓郁的紫色系
|
|
1496
|
+
["#C792DF", "#AB69C6", "#9040AD", "#7B2CBF", "#5A189A"],
|
|
1497
|
+
// 4. Sunset Glow: 温暖、明亮的日落色系
|
|
1498
|
+
["#FFDD77", "#FFC94A", "#FFB703", "#F8961E", "#E85D04"],
|
|
1499
|
+
// --- 4组缤纷色 ---
|
|
1500
|
+
// 5. Vivid Candy: 鲜艳的糖果色
|
|
1501
|
+
["#E63946", "#588157", "#A8DADC", "#457B9D", "#1D3557"],
|
|
1502
|
+
// 6. Retro Groove: 复古风格
|
|
1503
|
+
["#264653", "#2A9D8F", "#F0C151", "#F4A261", "#E76F51"],
|
|
1504
|
+
// 7. Neon Pop: 高对比度的现代色彩组合
|
|
1505
|
+
["#EF476F", "#FFD166", "#06D6A0", "#118AB2", "#073B4C"],
|
|
1506
|
+
// 8. Bold Impact: 大胆且冲击力强的撞色
|
|
1507
|
+
["#D90429", "#F95738", "#F2C57C", "#0C7C59", "#003E1F"]
|
|
1506
1508
|
];
|
|
1507
1509
|
COMMON_STYLE = `
|
|
1508
1510
|
:root {
|
|
@@ -1698,7 +1700,7 @@ var Renderer = class {
|
|
|
1698
1700
|
const shuffledColors = [...selectedPalette].sort(() => 0.5 - Math.random());
|
|
1699
1701
|
const seriesColors = series.map((_, index) => shuffledColors[index % shuffledColors.length]);
|
|
1700
1702
|
const width = 600, height = 320;
|
|
1701
|
-
const padding = { top:
|
|
1703
|
+
const padding = { top: 10, right: 15, bottom: 60, left: 25 };
|
|
1702
1704
|
const chartWidth = width - padding.left - padding.right;
|
|
1703
1705
|
const chartHeight = height - padding.top - padding.bottom;
|
|
1704
1706
|
const maxVal = Math.max(1, ...series.flatMap((s) => s.data));
|