diff --git a/src/views/Jyh/ecosystem/components/UniversityClubStatsChart.vue b/src/views/Jyh/ecosystem/components/UniversityClubStatsChart.vue index 753b48e..7dc0ad7 100644 --- a/src/views/Jyh/ecosystem/components/UniversityClubStatsChart.vue +++ b/src/views/Jyh/ecosystem/components/UniversityClubStatsChart.vue @@ -262,13 +262,23 @@ const initCommunityChart = () => { barCategoryGap: '30%', itemStyle: { color: (params: any) => { - // 根据排名使用不同颜色 + // 为每个柱状图提供唯一颜色 const colors = [ ['#3b82f6', '#60a5fa'], // 蓝色 ['#8b5cf6', '#a78bfa'], // 紫色 ['#ec4899', '#f472b6'], // 粉色 ['#10b981', '#34d399'], // 绿色 - ['#f59e0b', '#fbbf24'] // 橙色 + ['#f59e0b', '#fbbf24'], // 橙色 + ['#ef4444', '#fca5a5'], // 红色 + ['#06b6d4', '#7dd3fc'], // 青色 + ['#84cc16', '#a3e635'], // 黄绿色 + ['#f97316', '#fb923c'], // 橙红色 + ['#6366f1', '#818cf8'], // 靛蓝色 + ['#14b8a6', '#2dd4bf'], // 翠绿色 + ['#f43f5e', '#f9a8d4'], // 玫红 + ['#a855f7', '#c084fc'], // 紫罗兰 + ['#d946ef', '#e879f9'], // 梅花色 + ['#0ea5e9', '#38bdf8'] // 天蓝色 ]; const colorPair = colors[params.dataIndex % colors.length]; return new echarts.graphic.LinearGradient(0, 1, 0, 0, [