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

d3-sankeyseq

v1.0.7

Published

Sankey plugin for sequential data

Readme

d3-sankeySeq

Image of css styled sankey chart

d3-sankeySeq.js is an adaptation of the sankey plugin for sequential data. Unlike the standard sankey diagram, where the position of the nodes are determined by an iterative procedure, sankeySeq is suitable for sequential data for a given sequence (e.g. time sequence) where the node positions are fixed.

Here is an example how to use it.

Installing

If you use NPM, npm install d3-sankeyseq.

API Reference

<script>
var sankeySeq = d3.sankeySeq();
</script>

function | parameter | explanation ------------ | -------|------ debugOn() | boolean | e.g. sankeySeq.debug(true) turns on/off the console.log debugging. The default setting is false. size() | 2-dim array |, e.g. sankeySeq.size([600, 400]) sets size of the SVG based on an array [width, height]. The default size is [700, 500]. margin() | integer | e.g. sankeySeq.margin(10) sets margin in pixels for top, right, bottom, left. The default margin is 0 px. sequence() | array | e.g. sankeySeq.sequence(["2000", "2001", "2002"]) sets the order of the sequence based on an array. The default order is ascending. categories() | array | e.g. sankeySeq.categories(["A", "B", "C"]) sets the order of the categories based on an array. The default order is ascending. sequenceName() | string | e.g. sankeySeq.sequenceName("year") sets the name of the x axis. The default name is "sequence". categoryName() | string | e.g. sankeySeq.categoryName("state") sets the name of the y axis. The default name is "category". valueName() | string | e.g. sankeySeq.valueName("frequency") sets the name of the value. The default name is "value". nodeWidth() | integer | e.g. sankeySeq.nodeWidth(20) sets the width of a node in pixels. The default width is 15. nodePadding() | integer | e.g. sankeySeq.nodePadding(10) sets the y-padding between the categories in pixels. The default padding is 8. nodes() | array | e.g. sankeySeq.nodes([{"node":0,"name":"node0"},{"node":1,"name":"node1"}]) sets the list of nodes to the specified function or array. The default is []. links() | array | e.g. sankeySeq.links([{"source":0,"target":2,"value":2},{"source":1,"target":2,"value":2}]) sets the list of links to the specified function or array. The default is []. maxValue() | integer | e.g. sankeySeq.maxValue(100) sets the reference nodeHeight in pixels for computing the vertical scaling factor. The default is the node height of the node with the largest value.