|
@@ -58,10 +58,10 @@ export function getPieOption({ data = [] as any[],
|
|
// },
|
|
// },
|
|
legend: {
|
|
legend: {
|
|
textStyle: {
|
|
textStyle: {
|
|
- fontSize: getPx(14),
|
|
|
|
|
|
+ fontSize: 14,
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
},
|
|
},
|
|
- itemWidth: getPx(20), itemHeight: getPx(14),
|
|
|
|
|
|
+ itemWidth: getPx(20), itemHeight: 14,
|
|
...legend
|
|
...legend
|
|
},
|
|
},
|
|
color: colors,
|
|
color: colors,
|
|
@@ -84,21 +84,22 @@ export function getPieOption({ data = [] as any[],
|
|
// formatter: '{b}\n{d}%',
|
|
// formatter: '{b}\n{d}%',
|
|
minMargin: 5,
|
|
minMargin: 5,
|
|
edgeDistance: 10,
|
|
edgeDistance: 10,
|
|
- lineHeight: getPx(14),
|
|
|
|
- fontSize: getPx(14),
|
|
|
|
|
|
+ lineHeight: 14,
|
|
|
|
+ fontSize: 14,
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
position: "center",
|
|
position: "center",
|
|
formatter: `{a|${total} }\n{b|告警总数}`,
|
|
formatter: `{a|${total} }\n{b|告警总数}`,
|
|
rich: {
|
|
rich: {
|
|
a: {
|
|
a: {
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
- fontSize: getPx(24),
|
|
|
|
|
|
+ fontSize: 22,
|
|
|
|
+ lineHeight: 26,
|
|
fontWeight: 'bold'
|
|
fontWeight: 'bold'
|
|
},
|
|
},
|
|
b: {
|
|
b: {
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
- fontSize: getPx(16),
|
|
|
|
- lineHeight: getPx(40),
|
|
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ lineHeight: 18,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -129,14 +130,16 @@ export function getPie3Option({ data = [] as any[],
|
|
top: '41%',
|
|
top: '41%',
|
|
left: 'center',
|
|
left: 'center',
|
|
textStyle: {
|
|
textStyle: {
|
|
- fontSize: getPx(20),
|
|
|
|
|
|
+ fontSize: 18,
|
|
fontWeight: 'normal',
|
|
fontWeight: 'normal',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
- lineHeight: getPx(20),
|
|
|
|
|
|
+ lineHeight: 10,
|
|
|
|
+ padding: 0,
|
|
},
|
|
},
|
|
subtextStyle: {
|
|
subtextStyle: {
|
|
- fontSize: getPx(24),
|
|
|
|
- lineHeight: getPx(24),
|
|
|
|
|
|
+ fontSize: 18,
|
|
|
|
+ lineHeight: 10,
|
|
|
|
+ padding: 0,
|
|
fontWeight: 'bold',
|
|
fontWeight: 'bold',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
},
|
|
},
|
|
@@ -160,8 +163,8 @@ export function getPie3Option({ data = [] as any[],
|
|
formatter: '{b}\n{d}% ({c})',
|
|
formatter: '{b}\n{d}% ({c})',
|
|
minMargin: 5,
|
|
minMargin: 5,
|
|
edgeDistance: 10,
|
|
edgeDistance: 10,
|
|
- lineHeight: getPx(14),
|
|
|
|
- fontSize: getPx(14),
|
|
|
|
|
|
+ lineHeight: 16,
|
|
|
|
+ fontSize: 13,
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
color: getTheme() === 'dark' ? '#fff' : '#333',
|
|
},
|
|
},
|
|
labelLine: {
|
|
labelLine: {
|
|
@@ -195,7 +198,7 @@ export function getPie4Option({ data = [] as any[],
|
|
bottom: '0',
|
|
bottom: '0',
|
|
left: 'center',
|
|
left: 'center',
|
|
textStyle: {
|
|
textStyle: {
|
|
- fontSize: getPx(14),
|
|
|
|
|
|
+ fontSize: 14,
|
|
fontWeight: 'normal'
|
|
fontWeight: 'normal'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -336,7 +339,7 @@ export function getRadarOption({
|
|
// startAngle: 45,
|
|
// startAngle: 45,
|
|
axisName: {
|
|
axisName: {
|
|
color: '#222',
|
|
color: '#222',
|
|
- fontSize: getPx(14),
|
|
|
|
|
|
+ fontSize: 14,
|
|
padding: [0, 0]
|
|
padding: [0, 0]
|
|
},
|
|
},
|
|
},
|
|
},
|