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

ewchart

v2.2.1

Published

chart for 2d

Downloads

3

Readme

NPM version NPM package

ewchart是专门将数据绘制成二维图形

  1. 开发ewchart的目的:我在开发业务需求过程中会经常遇到各种定制化的需求,然而现在的开源绘图工具大多写的太死,ewchart中只包含必要的绘图元素,诸如tooltip,foottab这类完全由用户自定义实现

  2. 支持的图形类别:折线图、面积图、饼图、直方图、散点图、树形图、蜡烛图

  3. 支持的渲染模式:svg、canvas、canvas+svg。

    • svg不适合path元素d属性超长的渲染场景,产生这种情况的一般都是曲线中包含大量的点,比如一条曲线由上万条数据生成,在用户侧可以在不影响曲线展示的情况下,将曲线中的部分点丢弃,在ewchart框架侧可以选择canvas渲染。饼图,柱状图,散点图目前只支持svg方式渲染,使用svg渲染的性能已经足够好了
    • canvas适合渲染大量的数据,可以使绘制更加细腻,但是当渲染的图形变更时需要重新计算,在这方面svg更胜一筹,svg不需要重新计算整个渲染场景,只需要修改对应需要变更的dom元素即可。当遇到图表渲染大量数据时,用户交互只改变图的部分区域,这种情况选择canvas+svg渲染,canvas负责渲染基础图形,svg负责渲染变动的区域。目前canvas渲染用来支持折线图的渲染,canvas+svg渲染用来支持折线图+brush画刷的渲染
  4. 未来的计划:持续提供更多的绘图功能

使用方式

demo图