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

echarts-cylinder

v1.0.1

Published

圆柱图

Downloads

3

Readme

cylinder

圆柱图,完美质感,支持label,支持堆叠

使用echarts绘制

项目地址:https://github.com/wzsxyz/cylinder

demo演示:https://wzsxyz.github.io/cylinder/lib/example.html

##文档

export default function(target, settings)

基本使用

let chart = echarts.init(document.getElementById('chart'));
cylinder(chart, {
    dataSource: {
      name: [2016,2017,2018],
      data: [
          {
              name: '资产',
              value: [1,2,3].map(()=>getRn())
          },
          {
              name: '负债',
              value: [1,2,3].map(()=>getRn())
          },
          {
              name: '收入',
              value: [1,2,3].map(()=>getRn())
          }
      ]
    }
});

settings配置:

  • dataSource: object, 数据源,格式为:{name: [], data:{name: '',value: []}},详见demo
  • theme: array<string/object>, 柱子主题配色,可以是内置主题名,也可以是主题对象。应配置为数组,按系列依次对应。主题对象包含三个字段: color:柱子颜色,arcColor:顶部底部的椭圆颜色,arcBorder: 顶部底部椭圆边框色
  • barWidth:number,柱状图宽度,0~1
  • barGap:number,柱状图系列间隔 0~1
  • stack:bool,开启堆叠模式
  • countStart: function(params, api, wSize, value), 自定义柱子定位点计算函数
  • label:object , 柱子顶部label
  • layout:string, 设置为y时柱子会横向放置,y轴会成为名称轴,x轴为数值轴
  • barMinHeight:number/function(height, seriesIndex, dataIndex),柱子最小高度,为function时返回值将作为柱子最终高度
  • barMaxWidth: number, 柱子最大宽度
  • beforeRender: function(option), echarts渲染前触发,可调整生成的option