修改图表
This commit is contained in:
parent
2483f21a97
commit
824c82ddb0
@ -12,10 +12,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, onUnmounted, getCurrentInstance,watch,onUpdated } from 'vue'
|
||||
import { ref, onMounted, onUnmounted, getCurrentInstance, watch, onUpdated } from 'vue'
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
import { useI18n } from 'vue-i18n'
|
||||
let {t} = useI18n();
|
||||
let { t } = useI18n();
|
||||
let ringRef = ref();
|
||||
let ringChart = null;
|
||||
const prop = defineProps({
|
||||
@ -32,7 +32,7 @@ const init = () => {
|
||||
color: "#fff",
|
||||
fontSize: 20,
|
||||
},
|
||||
left:'center'
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
@ -50,26 +50,26 @@ const init = () => {
|
||||
{
|
||||
name: "",
|
||||
type: "pie",
|
||||
radius: ["20%", "70%"],
|
||||
radius: ["40%", "70%"],
|
||||
center: ["50%", "45%"],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 5,
|
||||
borderRadius: 10,
|
||||
// borderColor: '#fff',
|
||||
borderWidth: 2,
|
||||
|
||||
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
formatter(params) {
|
||||
return `${params.name} \n${(params.value / prop.total * 100).toFixed(2)}%`
|
||||
},
|
||||
fontSize:20
|
||||
fontSize: 20
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
},
|
||||
top:'20%',
|
||||
top: '20%',
|
||||
data: prop.data,
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user