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

@ciscode/ui-chart-kit

v0.0.1

Published

Typed React chart components (Bar, Line, Area) built on Chart.js — no raw Chart.js config required.

Readme

@ciscode/ui-chart-kit

Typed React chart components (Bar, Line, Area) built on Chart.js.
Pass data and a theme — get a fully configured, responsive chart. No raw Chart.js options required.

Installation

npm install @ciscode/ui-chart-kit

Peer dependencies

| Package | Version | | ----------- | ------- | | react | ≥ 18 | | react-dom | ≥ 18 |

chart.js and react-chartjs-2 are bundled — you do not need to install them separately.


Data types

ChartDataPoint

interface ChartDataPoint {
  label: string;
  value: number;
}

ChartDataset

interface ChartDataset {
  id: string;
  label: string;
  data: ChartDataPoint[];
  color?: string; // hex color — falls back to theme.colors when omitted
}

ChartTheme

interface ChartTheme {
  colors: string[]; // palette shared across datasets
  fontFamily?: string;
  fontSize?: number;
  grid?: {
    color?: string;
    display?: boolean;
  };
  tooltip?: {
    enabled?: boolean;
    backgroundColor?: string;
    titleColor?: string;
    bodyColor?: string;
  };
  legend?: {
    display?: boolean;
    position?: 'top' | 'bottom' | 'left' | 'right';
  };
}

Components

BarChart

| Prop | Type | Default | Description | | ------------ | ---------------- | ------- | --------------------------------- | | data | ChartDataset[] | — | Datasets to render | | theme | ChartTheme | — | Theme (colors, fonts, grid, etc.) | | height | number | 300 | Chart height in pixels | | stacked | boolean | false | Stack bars on top of each other | | horizontal | boolean | false | Render horizontal bars |

import { BarChart } from '@ciscode/ui-chart-kit';
import type { ChartDataset, ChartTheme } from '@ciscode/ui-chart-kit';

const theme: ChartTheme = {
  colors: ['#4F46E5', '#10B981', '#F59E0B'],
  fontFamily: 'Inter, sans-serif',
  fontSize: 12,
  grid: { color: '#E5E7EB', display: true },
  tooltip: { enabled: true, backgroundColor: '#1F2937' },
  legend: { display: true, position: 'top' },
};

const datasets: ChartDataset[] = [
  {
    id: 'revenue',
    label: 'Revenue',
    data: [
      { label: 'Q1', value: 120 },
      { label: 'Q2', value: 180 },
      { label: 'Q3', value: 150 },
      { label: 'Q4', value: 210 },
    ],
  },
];

function App() {
  return <BarChart data={datasets} theme={theme} height={400} stacked />;
}

LineChart

| Prop | Type | Default | Description | | -------- | ---------------- | ------- | --------------------------------------- | | data | ChartDataset[] | — | Datasets to render | | theme | ChartTheme | — | Theme (colors, fonts, grid, etc.) | | height | number | 300 | Chart height in pixels | | smooth | boolean | false | Curved line interpolation (0.4 tension) |

import { LineChart } from '@ciscode/ui-chart-kit';

function App() {
  return <LineChart data={datasets} theme={theme} smooth />;
}

AreaChart

| Prop | Type | Default | Description | | --------- | ---------------- | ------- | --------------------------------------- | | data | ChartDataset[] | — | Datasets to render | | theme | ChartTheme | — | Theme (colors, fonts, grid, etc.) | | height | number | 300 | Chart height in pixels | | smooth | boolean | false | Curved line interpolation (0.4 tension) | | stacked | boolean | false | Stack areas on top of each other |

Area fill uses the dataset color at 20 % opacity automatically.

import { AreaChart } from '@ciscode/ui-chart-kit';

function App() {
  return <AreaChart data={datasets} theme={theme} stacked smooth />;
}

Design decisions

  • No Chart.js passthrough. Components expose a curated props API only. Chart.js configuration is built internally via buildChartConfig. This keeps the public surface small and prevents breaking changes when Chart.js internals evolve.
  • Colors cycle. When there are more datasets than theme.colors entries, colors wrap around automatically.
  • Responsive by default. Every chart renders inside a div with width: 100% and the specified height.

License

MIT