Skip to content

基础饼图 ​

示例 ​

基础示例 ​

vue
<script setup>
const data = {
  Taylor: 31,
  Clark: 71,
  Martin: 55,
  Perez: 89,
  Lewis: 46,
}
</script>

<template>
  <div v-ec="['pieSimple', data]" style="width: 100%; height: 300px;" />
</template>

参数说明 ​

索引类型必填默认值说明
0pieSimple是--
1Data是-数据
2EcOptions否-ECharts 配置参数

参数类型 ​

Data ​

ts
export type Data = (NumberObject | NumberKeyValuePairArray)[]

EcOptions ​

ts
export type EcOptions = Partial<EChartsOption>

基于 MIT 许可发布