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 🙏

© 2025 – Pkg Stats / Ryan Hefner

empsychart

v0.1.1

Published

A new lib to create charts with nice animations

Downloads

4

Readme

Presentation

Empsychart is a new lib to create simple chart in web pages.

The main goal of this lib is to create charts with the most fluid transition possible when data, color or other graph properties change.

Charts are render with HTML5 canvas. But this lib was develop in mind to use easely other technologies for rendering.

For the moment, only LineChart is available.

Roadmap :

  • create BarChart
  • create PieChart and DonutChart
  • create RadarChart
  • test rendering with technologies based on webgl

Installation

yarn add empsychart

# or with npm

npm install --save empsychart

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="chartContainer" style="width: 600px; height: 300px"></div>

  <script src="node_modules/empsychart/iife/index.js"></script>
  <script>
    var charContainer = document.getElementById("chartContainer");
    var chartOptions = {
      data: [
        { abscissa: 0, value: 40 },
        { abscissa: 50, value: 60 },
        { abscissa: 100, value: 52 },
        { abscissa: 150, value: 50 }
      ],
      graphColor: ['#eea849', '#eea84900']
    }
    var lineChart = new Chart.LineChart(charContainer, chartOptions)
  </script>
</body>
</html>

Exemple with module bundler

import { LineChart } from 'empsychart';
// or : import LineChart from 'empsychart/module/LineChart';

var charContainer = document.getElementById("chartContainer");
var chartOptions = {
  data: [
    { abscissa: 0, value: 40 },
    { abscissa: 50, value: 60 },
    { abscissa: 100, value: 52 },
    { abscissa: 150, value: 50 }
  ],
  graphColor: ['#eea849', '#eea84900']
}
var lineChart = new LineChart(charContainer, chartOptions)

LineChart

Create a graph

import { LineChart } from 'empsychart';

var charContainer = document.getElementById("chartContainer");
var chartOptions = {
  data: [
    { abscissa: 0, value: 40 },
    { abscissa: 50, value: 60 },
    { abscissa: 100, value: 52 },
    { abscissa: 150, value: 50 }
  ],
  graphColor: ['#eea849', '#eea84900']
}
var lineChart = new LineChart(charContainer, chartOptions)

Update a graph

var lineChart = new LineChart(charContainer, chartOptions)
// ...

const newData = [
    { abscissa: 0, value: 20 },
    { abscissa: 50, value: 72 },
    { abscissa: 100, value: 42 },
    { abscissa: 150, value: 60 }
  ],
lineChart.update({ data: newData });

options

data: { label?: string, abscissa: number, value: number }[]

Data to display on chart

pointRadius: number

default value: 0

Size of points displayed on chart

lineColor: string

default value: '#000'

Color of the line to display Available formats: hexa3, hexa4, hexa6, hexa8, rgb, rgba, hsl, hsla

graphColor: string | string[]

default value: ''

Color between curve and the origin of the chart You can set several colors to create a grandient

hasHorizontalGrid: boolean

default value: true

Display horizontal grid

horizontalGridColor: string

default value: 'rgba(100, 100, 100, 0.2)'

Horizontal grid color

horizontalGridLabelColor: string

default value: '#999'

Horizontal grid label color

hasVerticalGrid: boolean

default value: true

Display horizontal grid

verticalGridColor: string

default value: 'rgba(100, 100, 100, 0.2)'

Horizontal grid color

verticalGridLabelColor: string

default value: '#999'

Horizontal grid label color

isCurved: boolean

default value: false

Set to true to draw a curved line

font: string

default value: '12px sans-serif'

Font use for grid labels

transitionDuration: number

default value: 500 Transition duration when the chart is updated (in milliseconds)

ease: "linear" | "quad" | "elastic" | "bounce"

default value: 'quad' Ease function for animation