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

tvision-charts

v3.4.0-alpha.0

Published

tvision charts

Readme

tvision-charts

基于 Canvas 自研的高性能大数据可视化图表核心库,别名 TCharts。

特性

功能丰富

提供折线图、饼图、柱状图/瀑布流图、热力图、散点图、仪表盘、统计数字、漏斗图、地图、调用链拓扑图等十余种图表,可组合出丰富的可视化效果,更多特性持续迭代中。

设计规范

基于统一的设计价值观与业务协作,提供开箱即用的可视化图表设计资源。

移植性强

使用原生 JavaScript 开发,不依赖任何前端框架。通过简单封装即可移植到 React、Vue 等项目。

简单易用

通过属性配置即可完成数据可视化,配置项兼容 ECharts 等主流图表组件的使用习惯。

安装

npm install tvision-charts

使用方式

tvision-charts 通过 JSON 配置实现数据可视化,可以单独使用。

先在页面中添加一个有宽高的图表容器,例如 <div id="chart" style="width: 100%; height: 320px"></div>。

import Chart from 'tvision-charts';

const chart = new Chart('line', document.getElementById('chart'));
chart.setOption({
  xAxis: { type: 'category', data: ['周一', '周二', '周三'] },
  yAxis: { type: 'value' },
  series: [{ type: 'line', data: [120, 200, 150] }],
});

本地开发

# 在仓库根目录安装依赖
pnpm install

# 构建本包
pnpm build

# 启动示例(仓库根目录)
pnpm dev:site

构建产物位于 dist,示例位于 demo。

散点图 type: 'scatter'

散点图要求横纵轴均为数值轴,每个数据项是一个 [x, y] 数对,也可以写成 { value: [x, y] }。

var option = {
    xAxis: {},
    yAxis: {},
    tooltip: { trigger: 'item' },
    series: [
        {
            name: '样本',
            type: 'scatter',
            symbolSize: 20,
            data: [[10.0, 8.04], [8.07, 6.95], [13.0, 7.58], [9.05, 8.81]]
        }
    ]
};

| 配置项 | 说明 | | ------ | ---- | | symbolSize | 标记点的直径(像素),缺省 10 | | itemStyle | 标记点样式,支持 color、borderColor、borderWidth、opacity;color 缺省时使用系列颜色 | | xAxisIndex / yAxisIndex | 使用的坐标轴索引,缺省均为 0 |

存在散点系列时,横轴的默认类型会由 category 翻转为 value。若散点系列不是 series[0](例如散点与折线混合),需要显式配置 xAxis: { type: 'value' }。

首版限制:散点图暂不支持 dataZoom、markLine / markArea,以及自定义 symbol 形状(仅圆形)。

相关链接