BigScreenUI/src/components/echartsCom/Pie3dCom.vue

60 lines
1.2 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)
})
const options = {
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: {
color: "#0099FF",
},
align: 'left',
x: 0,
y: 23
},
plotOptions: {
pie: {
innerSize: 60,
depth: 45,
showInLegend: true,
dataLabels: {
enabled: false,
}
}
},
series: [{
name: '设备数量',
2023-12-02 17:14:56 +08:00
data:props.list
2023-11-30 10:48:06 +08:00
}]
}
</script>
<style scoped lang="scss"></style>