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

@backtestx/chart

v1.0.4

Published

Premium canvas charting library engine with mobile touch controls, custom indicators, watermark logos, drawing tools, custom crosshairs, and stable timescales.

Readme

Backtestx Chart

A premium, high-performance HTML5 Canvas charting library engine with built-in mobile touch support, technical indicators, drawing tools, custom coordinate scale templates, crosshairs, and watermark branding badges.

Features

  • 📱 Mobile First: Built-in pinch-to-zoom, relative touchpad-style dragging, scale dragging, and double-tap resets.
  • 🚀 Zero Dependencies: Pure HTML5 Canvas rendering engine compiled as a single standalone production script.
  • 🔌 Plug & Play Templates: Separate configuration files allowing developers to easily register custom indicator lines, drawing tools, watermark logos, intervals, and scales.
  • 🎯 Stable Timescales: Dynamic step offsets and locking intervals that prevent flickering or jumping dates during pan/drag operations.
  • 🎨 Theme Aware: Supports light and dark mode switches out of the box with custom coordinate badges.

Installation & CDN

Option 1: Load via unpkg CDN (Recommended)

You can directly link the compiled standalone bundle in your HTML page:

<script src="https://unpkg.com/backtestx-chart/dist/backtestx-chart.standalone.js"></script>

Option 2: Local Install

Install the package into your project:

npm install backtestx-chart

Quick Start

Create a container element in your HTML and load the chart:

<div id="chart-container" style="width: 100%; height: 500px;"></div>

<script src="https://unpkg.com/backtestx-chart/dist/backtestx-chart.standalone.js"></script>
<script>
  // Initialize the chart
  const chart = LightweightCharts.createChart('chart-container', {
    resolution: '1D',
    horizontalScale: 'time', // 'time', 'yield-curve', or 'strike-price'
  });

  // Supply candle/bar data
  chart.bars = [
    { time: 1718222400000, open: 67345.50, high: 68120.00, low: 67200.25, close: 67900.00, volume: 1200 },
    { time: 1718308800000, open: 67900.00, high: 68450.75, low: 67500.00, close: 68230.10, volume: 1350 }
  ];

  // Draw chart series
  chart.render();
</script>

Developer Customizations

You can load separate developer template scripts to override default styles and behavior:

  • custom-crosshair.js: Configure crosshair colors, width, line-dashes, and axis tooltip styles.
  • custom-pricescale.js: Configure Y-axis price label fonts, color, backgrounds, and vertical divider style.
  • custom-timescale.js: Configure X-axis timescale label fonts, color, backgrounds, and horizontal divider style.
  • custom-indicator.js: Register custom technical indicators (overlays and subpanel panes).
  • custom-watermark-logo.js: Setup custom badge brand watermark image url and redirect destination.

Build Commands

To recompile or package modifications:

  • obfuscated split bundles (used for standard site loaders):
    npm run build
  • standalone bundle (used for CDN or single script embeds):
    npm run build:standalone

License

MIT