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

power-chart

v0.0.1

Published

![](./docs/assets/images/readme1.png)

Downloads

2

Readme

Power Chart

A chart component for deconstruction complexity.

Features

  • Chart: 图表
  • Table: 表格
  • Axis: 轴
  • Tooltips: 工具提示
  • Label: 标签
  • Legend: 图例
  • DataPreview: 查看数据
  • Reference: 参考线

Chart Type

  • Line: 折线图
  • Bar: 柱状图
  • Stacked-Bar: 堆积柱状图
  • Area: 面积图
  • Stacked-Area: 堆积面积图
  • Pie: 饼图 & 玫瑰图
  • Ring: 环形图
  • Scatter: 散点图
  • Bubble: 气泡图
  • Table: 交叉表

Getting Start

<BIChart
  v-bind="BIChartProps"
  v-if="chartsDatas"
  ref="bi_chart"
  style="height: 100%; width: 100%;"
/>

more examples

Data Structure

Overview

完整的解析数据

{
    "data":{
        "chartData":[
            {
                "xName":"部门名称",
                "yName":"部门名称",
                "rowIndex":0,
                "colIndex":0,
                "data":[
                    {
                        "values":[
                            {
                                "x":"区域销售部",
                                "y":"区域销售部",
                                "layers":[
                                ],
                                "record":[
                                    {
                                        "key":"timestamp",
                                        "value":"1901-01-01T00:00:00.000Z"
                                    },
                                    {
                                        "key":"部门名称",
                                        "value":"区域销售部"
                                    }],
                                "style":{
                                    "tip":"<p>部门名称: 区域销售部</p><p>部门名称: 区域销售部</p><p>部门名称: 区域销售部</p>"
                                }
                            },
                            null,
                            null,
                            null,
                            null,
                            null,
                            {
                                "x":"委外部",
                                "y":"委外部",
                                "layers":[
                                ],
                                "record":[
                                    {
                                        "key":"timestamp",
                                        "value":"1901-01-01T00:00:00.000Z"
                                    },
                                    {
                                        "key":"部门名称",
                                        "value":"委外部"
                                    }],
                                "style":{
                                    "tip":"<p>部门名称: 委外部</p><p>部门名称: 委外部</p><p>部门名称: 委外部</p>"
                                }
                            },
                            null,
                            null,
                            null,
                            null,
                            null,
                            {
                                "x":"市场部",
                                "y":"市场部",
                                "layers":[
                                ],
                                "record":[
                                    {
                                        "key":"timestamp",
                                        "value":"1901-01-01T00:00:00.000Z"
                                    },
                                    {
                                        "key":"部门名称",
                                        "value":"市场部"
                                    }],
                                "style":{
                                    "tip":"<p>部门名称: 市场部</p><p>部门名称: 市场部</p><p>部门名称: 市场部</p>"
                                }
                            },
                            null,
                            null,
                            null,
                            null,
                            null,
                            {
                                "x":"电子商务",
                                "y":"电子商务",
                                "layers":[
                                ],
                                "record":[
                                    {
                                        "key":"timestamp",
                                        "value":"1901-01-01T00:00:00.000Z"
                                    },
                                    {
                                        "key":"部门名称",
                                        "value":"电子商务"
                                    }],
                                "style":{
                                    "tip":"<p>部门名称: 电子商务</p><p>部门名称: 电子商务</p><p>部门名称: 电子商务</p>"
                                }
                            },
                            null,
                            null,
                            null,
                            null,
                            null,
                            {
                                "x":"销售部",
                                "y":"销售部",
                                "layers":[
                                ],
                                "record":[
                                    {
                                        "key":"timestamp",
                                        "value":"1901-01-01T00:00:00.000Z"
                                    },
                                    {
                                        "key":"部门名称",
                                        "value":"销售部"
                                    }],
                                "style":{
                                    "tip":"<p>部门名称: 销售部</p><p>部门名称: 销售部</p><p>部门名称: 销售部</p>"
                                }
                            }],
                        "style":{
                        }
                    }]
            }],
        "xAxis":[
            {
                "type":"category",
                "data":[
                    {
                        "name":[
                            "区域销售部",
                            "委外部",
                            "市场部",
                            "电子商务",
                            "销售部"],
                        "size":1,
                        "yellow":{
                        },
                        "axisSize":5,
                        "x":0,
                        "style":{
                            "height":"18px",
                            "max-height":"none",
                            "width":"300px",
                            "left":"0px"
                        },
                        "distance":300
                    }],
                "axis_name":"部门名称"
            }],
        "yAxis":[
            {
                "type":"category",
                "data":[
                    {
                        "name":[
                            "区域销售部",
                            "委外部",
                            "市场部",
                            "电子商务",
                            "销售部"],
                        "size":1,
                        "yellow":{
                        },
                        "axisSize":5,
                        "x":0,
                        "style":{
                            "width":"51px",
                            "max-width":"none",
                            "height":"450px",
                            "top":"0px"
                        },
                        "distance":450
                    }],
                "axis_name":"部门名称"
            }]
    }
}

基础数据结构

  • chartData: 图表数据
  • xAxis: x轴数据
  • yAxis: y轴数据

xAxis/yAxis 轴数据结构说明

  • type: 轴类型 category / value
  • axis_name: 轴标题
  • data: 轴数据
    • name: 数值轴具体数据列表,
    • size: 当前轴所跨越的上级轴数量,
    • yellow: 标黄排序信息
    • axisSize: 轴所跨越的数量,用于计算轴懒加载
    • x: 当前轴在所有轴中的位置,用于计算轴懒加载
    • style: 轴展示样式
      • "width":"51px",
      • "max-width":"none",
      • "height":"450px",
      • "top":"0px"
    • distance: 当前轴到x:0 的距离,用于计算轴懒加载

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your unit tests

yarn test:unit

Run your end-to-end tests

yarn test:e2e

Lints and fixes files

yarn lint