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

@net-advantage/nabs-ui-charts

v0.63.0

Published

Reusable 2D chart controls for the Nabs UI library.

Readme

nabs-ui-charts

Reusable 2D chart controls for the Nabs UI library.

Includes:

  • TwoDChart for line and bar charts (single or multi-series).
  • PieChart for single-series pie/donut charts.

Usage

import { PieChart, TwoDChart } from "@net-advantage/nabs-ui-charts";

const series = [
  { yAxis: "Mon", revenue: 18, volume: 12, forecast: 16 },
  { yAxis: "Tue", revenue: 26, volume: 17, forecast: 23 },
  { yAxis: "Wed", revenue: 22, volume: 15, forecast: 21 },
];

export function Example() {
  return (
    <>
      <TwoDChart
        chartType="line"
        series={series}
        valueName="revenue"
        valueNames={["revenue", "volume", "forecast"]}
        palette={["#3b82f6", "#ef4444", "#10b981"]}
        xAxisName="Revenue"
        topSpace={8}
        yAxisMin={0}
        yAxisMax={40}
        yAxisInterval={5}
        showLegend
      />

      <PieChart
        series={series}
        valueName="revenue"
        chartType="donut"
        palette={["#3b82f6", "#ef4444", "#10b981"]}
        showLegend
      />
    </>
  );
}

Layout Model

TwoDChart uses a structured SVG layout tuned for dense charts:

  • Plot area with explicit boundary.
  • Horizontal guide lines derived from y-axis scale.
  • Vertical guide lines aligned to category positions.
  • Left y-axis tick labels.
  • Footer label zone for category labels and x-axis/series label.

Props

  • series accepts y-axis labels plus one or more named numeric values.
  • valueName selects a single named value (legacy/single-series mode).
  • valueNames selects one or more named values for multi-series mode (up to 10 series).
  • palette optionally overrides series colors for this chart instance (first 10 entries are used).
  • chartType switches between line and bar rendering.
  • topSpace adds top padding to the computed chart height (max value + topSpace).
  • yAxisMin defines the minimum y-axis value.
  • yAxisMax defines the maximum y-axis value.
  • yAxisInterval defines the guide/tick interval between yAxisMin and yAxisMax.
  • xAxisName and showXAxisName control the X-axis label display.
  • showLegend controls whether the footer legend is rendered when multiple series are active.

PieChart

  • series accepts y-axis labels plus numeric values.
  • valueName selects one named value to render as slices (single-series only).
  • chartType switches between pie and donut.
  • palette optionally overrides slice colors for this chart instance (first 10 entries are used).
  • showLegend toggles the legend beside the chart.

Notes

  • Values are clamped to the configured y-axis range for drawing.
  • Guide lines and y-axis ticks are generated from the configured min/max/interval.
  • Multi-series rendering uses a generic 10-color palette with light/dark theme tokens.
  • In multi-series mode, a footer legend is rendered under the x-axis name.
  • Use the workbench Charts page to interactively tune range and interval settings.