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

@alphacharts/core

v0.1.3

Published

WebGL2 financial charting engine: candles, lines, histograms, panes, scales, sync, datafeed. No runtime dependencies.

Readme

@alphacharts/core

The alphacharts engine: WebGL2 series (candles, line, area, histogram, ...), Canvas2D text, panes, price and time scales, crosshair, markers, price lines, synced charts and a datafeed driver. No runtime dependencies. WebGL2 is used when available, with a Canvas2D fallback (renderer: "auto" | "webgl" | "canvas2d").

npm install @alphacharts/core
import { createChart } from "@alphacharts/core";

const chart = createChart(el, { theme: "dark", timeZone: "UTC" });
const candles = chart.addSeries("candles", { priceFormat: { type: "price", minMove: 0.05 } });
candles.setData(bars);   // [{ time, open, high, low, close }], time in UTC ms
candles.update(bar);     // live: same time replaces, later time appends
chart.createPriceLine(candles, { price: 100, title: "target" });

Colour individual candles or bars, and shade a pane's background per bar:

candles.setBarColors({ time: Float64Array.of(t1, t2), color: Uint32Array.of(0xffd835ff, 0) }); // 0xRRGGBBAA, 0 = the up/down colours
candles.clearBarColors();                                   // exactly as before, column and all
candles.attachPrimitive(new BarShading());                   // .set(times, colors) / .setAt(time, color): behind the series, no part in autoscale

A bar's colour belongs to (series, time): update, prepend and setData keep the colours of the bars they keep, OhlcBar.color and ColumnarOhlc.color set them from the data. The colour column is added to the store, and to the level-of-detail pyramid (a bucket takes the last coloured bar's colour), the first time a colour is written; a series never coloured has no such column, and its candle and bar shaders do one integer compare per vertex on the colour slot every GPU record already carries (no added buffer). A value series' points may carry their own colour too (ValuePoint.color), which the line renderers draw per segment (the colour of the point the segment arrives at), in WebGL and Canvas2D. DataChange.kind has a new value, "color", announced to renderers only: plugins such as studies are not told, because nothing they follow moved.

The crosshair line is a dashed hairline by default; crosshair: { lineStyle: "solid", lineWidth: 2 } changes it (lineStyle takes the names a price line does; lineWidth is 1 or 2 CSS px). The chart takes keyboard focus (Tab) and draws a 2 px ring on it, only for keyboard focus (:focus-visible), in theme.focusRing (default: the crosshair colour; under theme: "inherit", --ac-ring then --ring). On an engine without :focus-visible support the ring shows on pointer focus too. Set focusRing: "transparent" in the theme to draw none.

Hide the Alphabench brand mark with createChart(el, { watermark: { visible: false } }).

@alphacharts/core/internal exposes rendering internals for the sibling series packages (chart-types, orderflow). It is not public API and changes without notice.

See the repository README for the full guide. MIT licence.