This commit is contained in:
zk
2023-12-21 16:42:22 +08:00
parent 5a33aa1df4
commit dd5a47e7fb
4 changed files with 13 additions and 7 deletions
+8 -5
View File
@@ -14,7 +14,7 @@ export function screenPie(chartData, total, color) {
borderColor: '#1b7ef2', borderColor: '#1b7ef2',
}, },
legend: { legend: {
left: '72%', right: '5%',
top: 'center', top: 'center',
orient: 'vertical', orient: 'vertical',
icon: 'circle', icon: 'circle',
@@ -23,12 +23,13 @@ export function screenPie(chartData, total, color) {
color: '#ffffff', color: '#ffffff',
fontSize: 16, fontSize: 16,
}, },
selectedMode: false
}, },
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: ['50%', '76%'], radius: ['50%', '72%'],
center: ['40%', '49%'], center: ['37%', '49%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
show: true, show: true,
@@ -50,7 +51,8 @@ export function screenPie(chartData, total, color) {
//左侧圆 //左侧圆
export function circleRing(chartData, total, color) { export function circleRing(chartData, total, color) {
const data = visibleChartLabel(chartData) // const data = visibleChartLabel(chartData)
// const data = chartData
return { return {
color: color, color: color,
tooltip: { tooltip: {
@@ -72,6 +74,7 @@ export function circleRing(chartData, total, color) {
color: '#ffffff', color: '#ffffff',
fontSize: 16, fontSize: 16,
}, },
selectedMode: false
}, },
series: [ series: [
{ {
@@ -89,7 +92,7 @@ export function circleRing(chartData, total, color) {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: data, data: chartData,
}, },
], ],
}; };
@@ -61,6 +61,7 @@ export function sleepCharts({ time, short, long, awake, type }) {
borderColor: '#1b7ef2', borderColor: '#1b7ef2',
}, },
legend: { legend: {
orient: 'horizontal',
data: ['清醒', '浅睡', '深睡'], data: ['清醒', '浅睡', '深睡'],
textStyle: { textStyle: {
color: '#ffffff', color: '#ffffff',
@@ -69,7 +70,7 @@ export function sleepCharts({ time, short, long, awake, type }) {
height: 40, height: 40,
itemHeight: 14, itemHeight: 14,
top: -5, top: -5,
left: '52%', right: '15%',
}, },
color: ['#14B3F8', '#6D7BEB', '#5451DC'], color: ['#14B3F8', '#6D7BEB', '#5451DC'],
xAxis: { xAxis: {
@@ -75,7 +75,7 @@
.count { .count {
position: absolute; position: absolute;
width: 77%; width: 71%;
top: 51%; top: 51%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -105,6 +105,8 @@
setIsShow(true); setIsShow(true);
} }
); );
} else {
Map.removeOverlayGroup();
} }
} catch {} } catch {}
} }