饼状图

基础饼图 1

示例:


代码:

<template>
  <pie-1 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-1 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>

基础饼图 2

示例:


代码:

<template>
  <pie-2 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-2 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>

玉玦图

示例:


代码:

<template>
  <pie-3 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-3 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>

玉玦图 2

示例:


代码:

<template>
  <pie-4 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-4 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>

玉玦图 3

示例:


代码:

<template>
  <pie-5 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-5 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>

动态环图

示例:


特有设置:

参数说明类型是否必要默认值
radius圆环尺寸Stringfalse'50%'
ringWidth圆环宽度Numbertrue10
ringCenter圆环中心设置Arrayfalse["35%", "50%"]
selectedOffset选中偏移距离Numberfalse10
autoPlay自动播放时间间隔Numberfalse3000

代码:

<template>
  <pie-6 :dataset="dataset" :option="option" :theme="easyv" />
</template>
<script setup>
import { ref } from "vue";
import { Theme } from "CoolData";
const { easyv } = Theme;
const option = ref({});
const dataset = ref({
  dimensions: ["product", "系列1"],
  source: [
    { product: "类别1", 系列1: 43.3 },
    { product: "类别2", 系列1: 83.1 },
    { product: "类别3", 系列1: 86.4 },
    { product: "类别4", 系列1: 72.4 },
  ],
});
</script>
<template>
  <pie-6 :dataset="dataset" :option="option" :theme="theme" />
</template>
<script>
import { Theme } from "CoolData";
const { easyv } = Theme;
export default {
  data() {
    option: {

    },
    dataset: {
      dimensions: ["product", "系列1"],
      source: [
        { product: "类别1", "系列1": 43.3},
        { product: "类别2", "系列1": 83.1},
        { product: "类别3", "系列1": 86.4},
        { product: "类别4", "系列1": 72.4},
      ],
    },
    theme: easyv
  }
}
</script>
Last Updated:
Contributors: wzs28150