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 🙏

© 2024 – Pkg Stats / Ryan Hefner

chrt-line

v0.0.46

Published

Line chart component for Chrt

Downloads

80

Readme

chrt-line

Component for the creation of Line charts and Area charts in chrt. Line charts are used to display data as a series of points connected by line segments. A line chart is often used to visualize a trend in data over intervals of time.

In Area charts, the area between axis and line are painted with colors, textures or hatchings, they facilitate the comparison of two or more quantities.

How to build

Install the dependencies

npm install

Build the package

npm build

Developing

If you want to develop and see the changes reloaded live into another app you can use the watch script

npm run watch

Use it as a module

Method 1 - tgz package

Use the tgz provided in the repository

You can use the chrt-line-VERSION.tgz package. The following commands will expand the chrt module in the node_modules folder of your project. Ready to be used with the usual import command:

cp chrt-line-VERSION.tgz SOMEWHERE
cd myproject
npm install SOMEWHERE/chrt-line-VERSION.tgz

Create a tgz npm package

You can create a package for testing with

npm pack

This command will create a file called chrt-line-VERSION.tgz in the root folder of chrt.

Method 2 - symlinked package

Create a global node module

npm link

This creates chrt-line module inside your global node_modules so that you can import it with import {chrtLine} from 'chrt-line';

Use the module in a different app

npm link chrt

This will create a sym link to the module created in your global.

Use it in your code

After having installed or sym-linked the node you can use it as usual

import {chrtLine} from 'chrt-line';

Testing

Unit test with Jest

Run npm run test to run all the tests on the code with Jest.

npm run test

To run only one test:

npx jest test/scales/scaleLinear.test.js