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

pict-section-activitygraph

v1.0.4

Published

Pict section that renders a stacked-bar activity timeline: one bar per period, stacked by type or actor, across parallel domains. Themed SVG, no chart dependency.

Readme

pict-section-activitygraph

A Pict section that renders a stacked-bar activity timeline. Time runs top to bottom, one row per period; each domain you configure is a column of horizontal stacked bars (one bar per period, segmented by a stack dimension). Super-group separators mark quarter boundaries (for day, week, and month granularities) or year boundaries (for quarter). It is a hand-rolled themed SVG, so there is no chart-library dependency and it re-themes live from the host's theme tokens.

Built for the Plansheet "System Activity" view: two columns (Work Items and Knowledge), one bar per week stacked by activity type, with a switcher for the granularity, the stack dimension, and the measure.

Install

npm install pict-section-activitygraph

Use

Register the view with a host Pict application and point it at a DOM slot:

const libActivityGraph = require('pict-section-activitygraph');

pict.addView('MyActivityGraph', Object.assign({}, libActivityGraph.default_configuration,
    {
        ActivityGraph:
        {
            Period: 'Week',
            Columns:
            [
                { Key: 'WorkItems', Title: 'Work Items', Accent: '#e0891e' },
                { Key: 'Knowledge', Title: 'Knowledge', Accent: '#3f7fd0' }
            ],
            // called when the user picks a new granularity, so the host can refetch that period
            PeriodChangeHandler: (pPeriod, pView) => loadAndSetData(pPeriod, pView)
        },
        Renderables: [ { RenderableHash: 'Pict-ActivityGraph-Container', TemplateHash: 'Pict-ActivityGraph-Container', ContentDestinationAddress: '#My-Chart-Slot', RenderMethod: 'replace' } ]
    }), libActivityGraph);

pict.views.MyActivityGraph.render();
pict.views.MyActivityGraph.setData({ Period: 'Week', Buckets: rows });

Each bucket in Buckets is one aggregated cell:

{ PeriodStart: '2025-06-02', PeriodKey: '2025-W23', Domain: 'WorkItems',
  ActivityType: 'Created', ActorKind: 'Human', EventCount: 3, Volume: 3 }

Domain matches a column Key. The stack dimension is ActivityType by default or ActorKind (via the Stack toggle, or setStackBy('ActorKind')); the measure is EventCount by default or Volume (setMeasure('Volume')).

Renderer

The SVG builder is a pure function, exported for tests and headless rasterization:

const libActivityGraph = require('pict-section-activitygraph');
const tmpSVG = libActivityGraph.Renderer.buildSVG({ Period: 'Week', Buckets: rows });

Test

npm test