npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ahwecharts/pie-base

v1.0.1

Published

echarts line base component

Downloads

7

Readme

react echarts pie base

基础饼图echarts图表。提取常用api进行封装的echarts插件。

安装

npm install --save @ahwecharts/pie-base

引入

import LineBaseEcharts from '@ahwecharts/pie-base';
or
import { PieBaseEcharts } from 'ahwecharts';

基本用法

import ReactDOM from 'react-dom';
import PieBaseEcharts from '@ahwecharts/line-base';

ReactDOM.render(
  <div>
    <PieBaseEcharts
      isSwitch
      label={{
        show: true,
        formatter: '{b}\n{d}',
        length: 20,
        length2: 50,
      }}
      legend={{
        show: true,
      }}
      series={{
        radius: ['40%', '70%'],
        center: ['50%', '40%']
      }}
      data={[
        { name: 'Mon', value: 150},
        { name: 'Tue', value: 230},
        { name: 'Wed', value: 224},
        { name: 'Thu', value: 218},
        { name: 'Fri', value: 135},
        { name: 'Sat', value: 147},
        { name: 'Sun', value: 260},
      ]}
    />
  </div>,
  _mount_
);

Props Line

| 参数 | 说明 | 类型 | 默认值 | | -------- | -------- | -------- | -------- | | width | 宽 | string | 100% | | height | 高 | string | 100% | | colors | 饼图颜色 | string[] | -- | | label | 标签属性 | LabelProps | -- | | series | 饼图属性 | SeriesProps | -- | | legend | 图例属性 | LegendComponentOption | -- | | isSwitch | 是否自动切换 Tooltip | boolean | false | | switchTime | 自动切换时间 | number | 2000 | | data | 数据 | any[] | [] | | onClick | 点击 | (v: any) => void | -- |

Props data[]

| 参数 | 说明 | 类型 | 默认值 | | -------- | -------- | -------- | -------- | | name | 健 | string | -- | | value | 值 | number | -- |

Props LabelProps

| 参数 | 说明 | 类型 | 默认值 | | -------- | -------- | -------- | -------- | | show | 是否显示标签 | boolean | false | | color | 文字颜色 | string | #333 | | fontSize | 字体大小 | number / string | 14 | | formatter | 标签内容格式 | string / Function | -- | | edgeDistance | 文字边距 | number | -- | | lineHeight | 文字行高 | number | 20 | | minMargin | 标签之间间距 | number | 10 | | length | 第一段引导线长度 | number | 10 | | length2 | 第二段引导线长度 | number | 20 |

Props SeriesProps

| 参数 | 说明 | 类型 | 默认值 | | -------- | -------- | -------- | -------- | | center | 拼图位置 | string / number / string[] / number[] | -- | | radius | 饼图半径 | string / number / string[] / number[] | -- |

Props LegendComponentOption

API