态势感知平台-开源生态与贡献价值全景-高校开源社团/俱乐部数量卡片样式修改
This commit is contained in:
@@ -262,13 +262,23 @@ const initCommunityChart = () => {
|
|||||||
barCategoryGap: '30%',
|
barCategoryGap: '30%',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: (params: any) => {
|
color: (params: any) => {
|
||||||
// 根据排名使用不同颜色
|
// 为每个柱状图提供唯一颜色
|
||||||
const colors = [
|
const colors = [
|
||||||
['#3b82f6', '#60a5fa'], // 蓝色
|
['#3b82f6', '#60a5fa'], // 蓝色
|
||||||
['#8b5cf6', '#a78bfa'], // 紫色
|
['#8b5cf6', '#a78bfa'], // 紫色
|
||||||
['#ec4899', '#f472b6'], // 粉色
|
['#ec4899', '#f472b6'], // 粉色
|
||||||
['#10b981', '#34d399'], // 绿色
|
['#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];
|
const colorPair = colors[params.dataIndex % colors.length];
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||||
|
|||||||
Reference in New Issue
Block a user