echart 配置参考笔记

2023-11-08  本文已影响0人  吉凶以情迁
image.png

普通图表可以通过grid:{}节点配置,但是pie不行

文档地址
https://echarts.apache.org/examples/zh/index.html

废话不多说,
vue
npm install echart
或 yarn add echart

<sccript setup>

import * as echarts from "echarts";
let pieMonthExceptionRef = ref(null)
let ExceptionTypePercentConfig = reactive({
// echart config
});
onMounted(() => {
setTimeout(()=>{
    let monthEchart = echarts.init(pieMonthExceptionRef.value)
    monthEchart.setOption(ExceptionTypePercentConfig)
},500)
})
</script>
<template>
<div ref="pieMonthExceptionRef" style="width: 100%;height: 100%" ></div>
</template>

下面的配置是

上一篇 下一篇

猜你喜欢

热点阅读