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

Chart.Smith.js

v0.2.0

Published

Smith chart implementation for Chart.js

Readme

Chart.Smith.js

Build Status

Provides a Smith Chart for use with Chart.js

Documentation

To create a Smith Chart, include Chart.Smith.js after Chart.js and then create the chart by setting the type attribute to 'smith'

var mySmithChart = new Chart({
	type: 'smith',
	data: dataObject
});

Data Representation

The smith chart can graph multiple datasets at once. The data for each dataset is in the form of complex numbers.

var smithChartData = {
	datasets: [{
		label: 'Dataset 1',
		data: [{
			real: 0,
			imag: 1
		}, {
			real: 1,
			imag: 1
		}]
	}]	
};

Scale Configuration

The smith chart scale can be configured by placing options into the config that is passed to the chart upon creation.

new Chart({
	config: {
		scale: {
			display: true, // setting false will hide the scale
			gridLines: {
				// setting false will hide the grid lines
				display: true, 

				// the color of the grid lines
				color: rgba(0, 0, 0, 0.1), 

				// thickness of grid lines
				lineWidth: 1, 
			},
			ticks: {
				// The color of the scale label text
				fontColor: 'black',

				// The font family used to render labels
				fontFamily: 'Helvetica',

				// The font size in px
				fontSize: 12,

				// Style of font
				fontStyle: 'normal'

				// Function used to convert real valued ticks to strings
				rCallback: function(tick, index, ticks) {}

				// Function used to convert imaginary valued ticks to strings
				xCallback: function(tick, index, ticks) {}
			}
		}
	}
});

Dataset Configuration

The datasets for smith charts support many of the same options as the line chart

{
	// Bezier Curve tension. Set to 0 for straight lines
	tension: 0,

	// Fill color for dataset
	backgroundColor: 'rgba(0, 0, 0, 0.1)',

	// Width of line
	borderWidth: 1,

	// Line color
	borderColor: 'rgba(0, 0, 0, 0.1)',

	// Line ending style
	borderCapStyle: 'butt',

	// Line dash style
	borderDash: [],

	// Dash offset. Used in conjunction with borderDash property
	borderDashOffset: 0,

	// Line join style
	borderJoinStyle: 'miter',

	// Do we fill the line?
	fill: true,

	// Point radius
	radius: 3,

	// Point style (circle, cross, etc)
	pointStyle: 'circle',

	// Point fill color
	pointBackgroundColor: 'rgba(0, 0, 0, 0.1)',

	// Point stroke color
	pointBorderColor: 'rgba(0, 0, 0, 0.1)',

	// Point stroke width
	pointBorderWidth: 1,

	// Used for hit detection
	hitRadius: 3
}

License

Chart.Smith.js is available under the MIT license.

Bugs & issues

When reporting bugs or issues, if you could include a link to a simple jsbin or similar demonstrating the issue, that would be really helpful.