BigScreenUI/src/components/echartsCom/Pie3dCom.vue

77 lines
1.5 KiB
Vue
Raw Normal View History

2023-11-30 10:48:06 +08:00
<template>
<div id="container" style="height: 100%;height: 100%;"></div>
</template>
<script setup lang="ts">
import Highcharts from "highcharts"
import highcharts3d from 'highcharts/highcharts-3d'
2023-12-02 17:14:56 +08:00
const props = defineProps({
list:{
type:Array,
default:[]
}
})
2023-11-30 10:48:06 +08:00
onMounted(() => {
2023-12-02 17:14:56 +08:00
console.log("props-list",props.list)
2023-11-30 10:48:06 +08:00
Highcharts.chart('container', options)
})
2024-03-15 16:37:36 +08:00
const options:any = {
2023-11-30 10:48:06 +08:00
chart: {
type: 'pie',
backgroundColor: 'rgba(0, 0, 0, 0.32)',
options3d: {
enabled: true,
alpha: 45
},
spacingTop: 20,
spacingBottom: 20,
spacingLeft: 17,
spacingRight: 17,
},
title: {
text: '施工单位自有设备详情',
margin: 50,
style: {
2024-05-20 15:39:56 +08:00
color: "#66E0FF",
2023-11-30 10:48:06 +08:00
},
align: 'left',
x: 0,
y: 23
},
plotOptions: {
pie: {
innerSize: 60,
depth: 45,
showInLegend: true,
dataLabels: {
enabled: false,
}
}
},
2024-05-20 15:39:56 +08:00
legend: {
itemStyle: {
color: '#f0f0f0',
},
itemHoverStyle: {
color: '#66E0FF',
},
itemHiddenStyle: {
color: '#999',
},
},
2023-11-30 10:48:06 +08:00
series: [{
name: '设备数量',
2024-05-20 15:39:56 +08:00
data:props.list
2024-03-20 17:45:15 +08:00
}],
accessibility:{
enabled: false
2024-05-20 15:39:56 +08:00
},
credits: {
enabled: false
},
2023-11-30 10:48:06 +08:00
}
</script>
<style scoped lang="scss"></style>