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

@quantlife/qlchart

v0.0.5

Published

React chart library based on lightweight-charts

Readme

QLChart

QuantLife 多功能图表库 — 基于 lightweight-charts + lightweight-charts-drawing 的 React 图表组件库。

特性

  • 📊 10种K线类型 — 蜡烛图、空心蜡烛图、美国线、折线图、面积图、基准线、平均K线、成交量蜡烛图、砖形图、线形反转
  • 🎨 23种绘图工具 — 趋势线、矩形、斐波那契回撤/扩展/圆形/时区、平行通道、画笔、测量器、旋转矩形等
  • 📐 图表形态工具 — ABCD、XABCD、头肩顶、三角形、赛福形态
  • 🔗 多面板布局 — 支持 1/2/4 分屏,面板间光标联动
  • 📏 时间轴延伸 — 未来区域可绘制、可拖拽
  • 🎯 磁铁吸附 — 绘图锚点自动对齐K线
  • 💾 绘图持久化 — 绘图数据自动保存/恢复
  • 📱 响应式设计 — 适配各种屏幕

安装

pnpm add @quantlife/qlchart

快速开始

import { QLChartProvider, QLChartPanel } from '@quantlife/qlchart';
import '@quantlife/qlchart/dist/style.css';

function App() {
  return (
    <QLChartProvider fetchFn={async (params) => {
      const res = await fetch(`/api/kline?pair=${params.pairId}&period=${params.period}`);
      return res.json();
    }}>
      <QLChartPanel pairId="BTCUSDT" product="BTC" period="1h" />
    </QLChartProvider>
  );
}

多面板布局

import { QLChartLayout } from '@quantlife/qlchart';

<QLChartLayout mode="4" crosshairSync />

Standalone 引入

<script src="https://cdn.example.com/qlchart.standalone.js"></script>
<link rel="stylesheet" href="https://cdn.example.com/style.css">
<div id="chart"></div>
<script>
  const { QLChartProvider, QLChartPanel } = QLChart;
  // ...
</script>

API 文档

详细 API 文档请参阅 docs/api.md

技术栈

  • React 18+
  • TypeScript 5+
  • lightweight-charts 5+
  • lightweight-charts-drawing
  • Zustand(状态管理)
  • Vite(构建工具)

License

Private © QuantLife