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

@commute/market-data-chartjs

v3.1.0

Published

A library to help you render market data using ChartJS.

Readme

Commute Market Data Render with ChartJS

A library to help you render market data using ChartJS. This was originally developed to be used in a Webflow project, but you can use it in any other platform.

Reference

Requirements

This library requires the use of chartjs, plus a date adapter for its time x-axis scale. Add the following lines inside the <head> tag in your website, in this order:

<script defer src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.bundle.min.js"></script>

Use defer (not async) on these scripts, and load this library's script after them, so the date adapter is registered before any chart is created.

Installation

Add the following line inside the tag in your website:

<script async src="https://cdn.jsdelivr.net/npm/@commute/market-data-chartjs@version/dist/index.js"></script>

How to use

Add the following line inside the tag in your website:

<script async src="https://cdn.jsdelivr.net/npm/@commute/market-data@version/dist/index.js"></script>

Chart Configuration

The chart's <canvas> element accepts a few optional data-* attributes:

  • data-currency: e.g. data-currency="ARS" formats tooltip values as currency instead of plain numbers.
  • data-tick-interval-minutes: e.g. data-tick-interval-minutes="15" forces the x-axis ticks to fall at exact, evenly-spaced multiples of that interval instead of Chart.js's automatic "nice" steps.
  • data-line-color, data-gradient-top-color, data-gradient-bottom-color: override the line and fill colors.
  • data-gradient-angle: e.g. data-gradient-angle="30" tilts the fill gradient clockwise by that many degrees, instead of the default straight-down (0) direction.
  • data-start-time / data-end-time: e.g. data-start-time="11:00" and data-end-time="17:00" pin the x-axis to that fixed schedule window (anchored to today), instead of auto-ranging to only the data received so far. As new points arrive during the day, the line fills in toward the end of a stable axis rather than the axis growing with the data. Both attributes must be set together — if only one is present, the axis auto-ranges as before. Times use HH:MM or HH:MM:SS format.

Number Localization

You can localize numbers by adding the custom attribute 'data-number' to the elements that need that utility. It will get the website's locale by using the attributes 'data-wf-locale=locale' or 'data-locale=locale'. For example, if your HTML has the 'data-wf-locale=es-AR' attribute, your locale would be 'es-AR'.

Special Thanks

A huge thank you to Finsweet for providing the foundation of this project with Finsweet Developer Starter. 💪🏽

Plase refer to the original project for extensive documentation.