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

d3nic

v0.5.2

Published

D3 New Interactive Charts

Downloads

1,284

Readme

d3nic

license

What is this?

d3nic is a D3.js based library that exposes methods to easily create interactive and dynamic charts.

DEMO at https://ncastaldo.github.io/d3nic

It is based on the concepts of chart and component.

  • A chart is an object that may contain multiple components and is responsible of computing all the common variables that these element have.
  • A component is the actual object that we want to visualize.

How to use it

If you use npm, npm i d3nic.

For legacy environments, you can load d3nic's UMD bundle from an npm-based CDN such as jsDelivr; a d3nic global is exported:

<script src="https://cdn.jsdelivr.net/npm/d3nic/dist/index.js"></script>

An example

Let us define a simple bar chart:

document.createElement("svg"); // or d3.append('svg')

const chart = d3nic
  .bxChart()
  .selector("svg")
  .size({ width: 500, height: 400 })
  .data([2, 5, 8, 3, 6])
  .components([d3nic.bxBars()]);

chart.draw();

Now, if we call calling chart.draw() the chart will be plotted.

What if we want to use axes and have a nice transition when creating the chart? We just have to create the object this way:

const chart = d3nic
  .bxChart()
  .selector("svg")
  .size({ width: 500, height: 400 })
  .data([2, 5, 8, 3, 6])
  .components([d3nic.bxAxisX(), d3nic.bxAxisY(), d3nic.bxBars()])
  .draw({ duration: 500 });

A ready to use chart will be plotted, with a nice transition too.

In order to update the data, we can simply type:

chart.data([12, -5, 34, 22]).draw({ duration: 1000, delay: 1000 });

Available charts and components

Notes

  • The b placeholder stands for band, which indicates the usage of a (D3) bandScale to place the different data elements.
  • The presence of a char from <x, y> or <r (radius), a (angle)>, placed next to a b char, express what dimension will be used for the bandScale, e.g. bxChart -> apply the band on the x axis, the y axis will be used for the actual values.

Basic

The components can be used in combination to every chart

  • chart
    • circles
    • labelAxisX
    • labelAxisY
    • paths
    • texts

Composite

The components have to be used in combination to the related chart

  • bbChart

    • bbCircles
    • bbRects
  • brChart

    • brBars
    • brMouseBars
    • brStackBars
  • bxChart

    • bxArea
    • bxAxisX
    • bxAxisY
    • bxBars
    • bxBrush
    • bxCircles
    • bxLine
    • bxLines
    • bxMouseBars
  • byChart

    • byAxisX
    • byAxisY
    • byBars
    • byLines
    • byMouseBars
  • geoChart

    • geoRegions
  • xyChart

    • xyAxisX
    • xyAxisY
    • xyCircles
    • xyLinesH
    • xyLinesV
    • xyTexts