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 🙏

© 2026 – Pkg Stats / Ryan Hefner

canvas-vue-nyc

v0.0.4

Published

自定义画线

Readme

canvas

安装

npm install canvas-vue-nyc

使用

<canvas-nyc />

import CanvasNyc from 'canvas-vue-nyc'

export default {
    components: {
        CanvasNyc,
    },
}

属性说明

| 属性 | 说明 | 类型 | 默认值 | | ------ | -------------- | ------ | ------ | | widht | canvas 的宽度 | number | 1820 | | height | canvas 的高度 | number | 260 | | opt | 用来划线的属性 | object | -- |

Opt 说明

| 属性 | 说明 | 类型 | 默认值 | | --------------- | ---------------------------- | ------ | ------ | | start | 起点坐标 | array | [0,0] | | radius | 弧度半径 | number | -- | | bgcolor | 用来划线的属性 | object | -- | | width | 线的宽度 | number | -- | | color | 线的颜色 | color | -- | | defaultColor | 默认颜色 | color | -- | | path | 线的路径(见 tip 1) | array | -- | | tags | 标示 | array | -- |

tip1 路径说明

| 项 | 说明 | | ----- | ------------------- | | point | 画图坐标(见 tip2) | | isDefault | 是否使用默认颜色 | | b | 向下移动一个宽度 | | t | 向上移动一个宽度 | | l | 向左移动一个宽度 | | r | 向左移动一个宽度 | | tr | 上右弧度 | | tl | 上左弧度 | | lb | 左下弧度 | | lt | 左上弧度 | | br | 下右弧度 | | bl | 下左弧度 | | rb | 右下弧度 | | rt | 右上弧度 |

tip2 point

point 数据类型 object 属性 X,Y 左右画传 X,上下画传 Y X > 0 向右画 反之向左画 Y > 0 向下画 反之向上画