1.0.6 • Published 7 months ago

@jing-shi/pie-chart-component v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Pie Chart Component

A Vue 3 pie chart component based on ECharts.

Installation

npm install @jing-shi/pie-chart-component

Usage

Global Registration

import { createApp } from 'vue'

// main.ts
import PieChartComponent from '@jing-shi/pie-chart-component'
import '@jing-shi/pie-chart-component/style.css'

const app = createApp(App)
app.use(PieChartComponent)

Local Registration

<template>
  <pie-chart :data="chartData" :title="'My Chart'" />
</template>

<script setup>
import { PieChart } from 'pie-chart-component'
import 'pie-chart-component/dist/style.css'

const chartData = [
  {
    countResults: [
      {
        algorithmName: "Category 1",
        countNumber: 100
      },
      {
        algorithmName: "Category 2",
        countNumber: 200
      }
    ],
    dateType: "day"
  }
  // ... more data
]
</script>

Props

PropTypeDefaultDescription
dataArray[]Chart data array
titleString''Chart title
colorListArraydefault colorsCustom color list for chart

License

MIT

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago