update
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// 步数
|
||||
import {visibleChartLabel} from "/@/utils/utils.ts";
|
||||
|
||||
export function screenPie(chartData, total, color, formatter) {
|
||||
return {
|
||||
color: color,
|
||||
@@ -11,7 +14,7 @@ export function screenPie(chartData, total, color, formatter) {
|
||||
borderColor: '#1b7ef2',
|
||||
},
|
||||
legend: {
|
||||
left: '74%',
|
||||
left: '72%',
|
||||
top: 'center',
|
||||
orient: 'vertical',
|
||||
icon: 'circle',
|
||||
@@ -24,22 +27,19 @@ export function screenPie(chartData, total, color, formatter) {
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
// radius: ['50%', '86%'],
|
||||
// center: ['42%', '55%'],
|
||||
radius: ['50%', '76%'],
|
||||
center: ['42%', '49%'],
|
||||
center: ['40%', '49%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'outside',
|
||||
formatter: formatter,
|
||||
color: '#ffffff',
|
||||
fontSize: 14,
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
length: 6,
|
||||
length2: 20,
|
||||
length2: 10,
|
||||
minTurnAngle: 120,
|
||||
},
|
||||
data: chartData,
|
||||
@@ -49,7 +49,8 @@ export function screenPie(chartData, total, color, formatter) {
|
||||
}
|
||||
|
||||
//左侧圆
|
||||
export function circleRing(chartData, total, color, formatter) {
|
||||
export function circleRing(chartData, total, color) {
|
||||
const data = visibleChartLabel(chartData)
|
||||
return {
|
||||
color: color,
|
||||
tooltip: {
|
||||
@@ -81,14 +82,14 @@ export function circleRing(chartData, total, color, formatter) {
|
||||
label: {
|
||||
show: true,
|
||||
position: 'inner',
|
||||
formatter: formatter,
|
||||
formatter: '{d}%',
|
||||
color: '#ffffff',
|
||||
fontSize: 14,
|
||||
},
|
||||
labelLine: {
|
||||
show: false,
|
||||
},
|
||||
data: chartData,
|
||||
data: data,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user