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

phoebe-labs-charting-tools

v0.1.1

Published

Angular standalone D3 charting components (bar, line, pie, diamond scatter) with CSS-variable theming.

Readme

phoebe-labs-charting-tools

Angular standalone charting components powered by D3.js. Ships four chart components, their data models, and a tokenized (CSS-variable) theming system.

Published on the public npm registry: phoebe-labs-charting-tools.

Compatibility

| Peer dependency | Supported range | | ------------------- | --------------- | | @angular/core | ^17.3.0 | | @angular/common | ^17.3.0 | | d3 | ^7.9.0 |

All components are standalone — no NgModule import required.

Installing

It's a public package — no registry config or auth needed:

npm install phoebe-labs-charting-tools
npm install d3@^7.9.0    # peer dependency (Angular peers already present)

Alternative: local tarball

# In this workspace
npm run pack:lib    # -> dist/phoebe-labs-charting/phoebe-labs-charting-tools-<version>.tgz

# In the consuming project
npm install /abs/path/to/phoebe-labs-charting-tools-<version>.tgz
npm install d3@^7.9.0

Prefer the registry or tarball over npm linklink is unreliable with Angular peer-dep resolution and dual-package hazards.

Quick start

import { Component } from '@angular/core';
import {
  PlcBarChartComponent,
  PlcLineChartComponent,
  PlcPieChartComponent,
  PlcDiamondScatterChartComponent,
  BarChartDataPoint,
} from 'phoebe-labs-charting-tools';

@Component({
  selector: 'app-dashboard',
  standalone: true,
  imports: [
    PlcBarChartComponent,
    PlcLineChartComponent,
    PlcPieChartComponent,
    PlcDiamondScatterChartComponent,
  ],
  template: `
    <plc-bar-chart  [data]="series" [width]="480" [height]="280"></plc-bar-chart>
    <plc-line-chart [data]="series"></plc-line-chart>
    <plc-pie-chart  [data]="series"></plc-pie-chart>
  `,
})
export class DashboardComponent {
  series: BarChartDataPoint[] = [
    { label: 'Q1', value: 42 },
    { label: 'Q2', value: 58 },
    { label: 'Q3', value: 35 },
  ];
}

Components

<plc-bar-chart>PlcBarChartComponent

| Input | Type | Default | Description | | -------- | --------------------- | ------- | ------------------------ | | data | BarChartDataPoint[] | [] | Labelled values to plot. | | width | number | 360 | SVG width (px). | | height | number | 240 | SVG height (px). |

<plc-line-chart>PlcLineChartComponent

| Input | Type | Default | Description | | -------- | --------------------- | ------- | ------------------------ | | data | BarChartDataPoint[] | [] | Labelled values to plot. | | width | number | 360 | SVG width (px). | | height | number | 240 | SVG height (px). |

<plc-pie-chart>PlcPieChartComponent

| Input | Type | Default | Description | | -------- | --------------------- | ------- | ------------------------ | | data | BarChartDataPoint[] | [] | Labelled values to plot. | | width | number | 360 | SVG width (px). | | height | number | 260 | SVG height (px). |

<plc-diamond-scatter-chart>PlcDiamondScatterChartComponent

A square XY scatterplot rotated -45° (the "diamond"), with an optional density contour over the population cloud and a highlighted apex point.

| Input | Type | Default | Description | | ------------------ | -------------------- | -------- | --------------------------------------------------------------------------- | | scatterPlotData | ScatterPoint[] | [] | Full point cloud (population + the highlighted point). | | highlightedPoints| HighlightedPoint[] | [] | Which point(s) are the apex dot, and the colour to paint it/its arms. | | domainMax | number \| undefined| auto | Pins the top of the shared axis domain (e.g. 125). Omitted = nice ceiling.| | externalLabels | boolean | false | Render the two titles + values as an HTML header row above the SVG. | | includeTransitions| boolean | false | Animate in place on data change (points slide, axes rescale, contour morphs).| | width | string | '100%' | Host width (CSS). | | height | string | '100%' | Host height (CSS). |

import {
  PlcDiamondScatterChartComponent,
  ScatterPoint,
  HighlightedPoint,
} from 'phoebe-labs-charting-tools';

const points: ScatterPoint[] = [
  { id: 'a', values: [80, 65], labels: ['vs RHP', 'vs LHP'] },
  { id: 'b', values: [55, 90], labels: ['vs RHP', 'vs LHP'] },
];
const highlight: HighlightedPoint = { id: 'a', color: '#0a3161' };
<plc-diamond-scatter-chart
  [scatterPlotData]="points"
  [highlightedPoints]="[highlight]"
  [domainMax]="125"
  [includeTransitions]="true">
</plc-diamond-scatter-chart>

Data models

Exported from the package entry point:

  • BarChartDataPoint{ label: string; value: number }
  • ScatterPoint{ id, values: [number, number], labels: [string, string], percentiles?, relationship? }
  • HighlightedPoint{ id: string; color: string }
  • DiamondAxis — resolved { min, ticks } for the shared diamond axis
  • DiamondScatterModel — d3/Angular-free class owning axis/tick selection, geometry scale, and density-core partitioning (unit-testable)

Theming

Charts read their colours and typography from CSS custom properties. The type-safe map of those variable names is exported as D3_CHART_CSS_VARS.

Pull in the bundled token + theme definitions from your global stylesheet:

// styles.scss (consuming app)
@use 'phoebe-labs-charting-tools/src/lib/styles' as plc;

This defines defaults for variables such as --plc-d3-series-primary, --plc-d3-axis-text, the pie palette (--plc-d3-pie-1--plc-d3-pie-5), and density colours. Override any of them on :root (or a scoped selector) to retheme:

:root {
  --plc-d3-series-primary: #0a3161;
  --plc-d3-pie-1: #0a3161;
  --plc-d3-axis-text: #444;
}

License

MIT © Phoebe Labs