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

@core-ease/chartkit

v0.1.4

Published

A lightweight, composable React charting library with zero runtime dependencies. Line, area, bar, candlestick, pie, donut, scatter, and radar charts out of the box, for anything from financial/crypto data to general statistics.

Readme

chartkit

A composable React charting library, built the same way recharts is used day to day, but written from scratch with zero runtime dependencies. Line, area, bar, candlestick, pie, donut, scatter, and radar charts — one consistent API across all of them, so it doesn't matter if you're plotting stock/crypto prices, survey results, or server metrics.

Why another chart library

Most chart libraries either drag in D3 as a dependency, lock you into a rigid preset look, or don't have a real answer for financial/OHLC data without a second library bolted on. chartkit is one small package that covers the common cases teams actually need — general statistics and candlestick/price charts — with the same scales, tooltip, and legend behavior everywhere, so you only have to learn it once.

Installation

npm install @core-ease/chartkit

React and ReactDOM are peer dependencies (17+). Nothing else gets pulled in — no D3, no date library, no CSS framework.

Quick start

import { ChartContainer, LineChart } from '@core-ease/chartkit';

const data = [
  { month: 'Jan', revenue: 4200, cost: 3100 },
  { month: 'Feb', revenue: 4800, cost: 3300 },
  { month: 'Mar', revenue: 5100, cost: 3600 },
  { month: 'Apr', revenue: 4950, cost: 3400 },
];

function RevenueChart() {
  return (
    <ChartContainer height={320}>
      <LineChart
        data={data}
        xKey="month"
        series={[
          { dataKey: 'revenue', name: 'Revenue', color: '#6366f1' },
          { dataKey: 'cost', name: 'Cost', color: '#f97316' },
        ]}
      />
    </ChartContainer>
  );
}

ChartContainer measures its parent with a ResizeObserver and hands width/height down to whichever chart is inside it, so charts stay responsive without you tracking any state. Pass a fixed width/height directly to a chart instead if you don't want that behavior.

Every cartesian chart (line, area, bar, candlestick, scatter) shares the same data + xKey + series shape, the same hover tooltip with a legend you can click to hide/show a series, and the same grid/axis rendering — so switching from one chart type to another is usually a one-line change.

Chart types

Line

<LineChart data={data} xKey="month" series={series} curved showDots />

curved switches from straight segments to a smooth Catmull-Rom-style curve. showDots toggles the point markers.

Area

<AreaChart data={data} xKey="month" series={series} stacked fillOpacity={0.3} />

Set stacked for a stacked area chart (each series builds on top of the previous one) or leave it off for overlapping areas.

Bar

<BarChart data={data} xKey="month" series={series} stacked={false} barRadius={4} />

Supports grouped (side-by-side) or stacked bars via the same stacked flag.

Candlestick — for crypto & financial data

import { CandlestickChart } from '@core-ease/chartkit';

const ohlc = [
  { time: '09:00', open: 61200, high: 61800, low: 60900, close: 61650 },
  { time: '10:00', open: 61650, high: 62100, low: 61400, close: 61300 },
  { time: '11:00', open: 61300, high: 61500, low: 60700, close: 61050 },
];

<CandlestickChart data={ohlc} xKey="time" upColor="#22c55e" downColor="#ef4444" />

The key names (open/high/low/close) are configurable via openKey, highKey, lowKey, closeKey if your data source uses different field names — handy when you're piping data straight from an exchange API. The tooltip shows all four values automatically.

Scatter / bubble

<ScatterChart
  data={points}
  xKey="marketCap"
  series={[{ dataKey: 'volume24h', name: '24h Volume' }]}
  sizeKey="priceChange"
/>

Add sizeKey to turn it into a bubble chart — point radius scales with that field.

Pie & donut

import { PieChart, DonutChart } from '@core-ease/chartkit';

<PieChart data={[{ name: 'BTC', value: 45 }, { name: 'ETH', value: 30 }, { name: 'Other', value: 25 }]} dataKey="value" width={320} height={320} />
<DonutChart data={holdings} dataKey="value" nameKey="name" width={320} height={320} />

DonutChart is just PieChart with a sensible default innerRadius — pass your own innerRadius on either one if you want a specific ring thickness.

Radar

<RadarChart
  data={[{ metric: 'Speed', A: 80, B: 60 }, { metric: 'Reliability', A: 70, B: 90 }]}
  axisKey="metric"
  series={[{ dataKey: 'A', name: 'Server A' }, { dataKey: 'B', name: 'Server B' }]}
  width={360}
  height={360}
/>

Good for comparing multiple entities across several dimensions at once — benchmark results, skill assessments, that kind of thing.

Tooltip and legend

Every chart shows a tooltip on hover by default (showTooltip) and a legend underneath (showLegend). Clicking a legend entry hides that series from the chart and recalculates the axes — no extra wiring needed. Pass tooltipFormatter={(value, name) => ...} to control how numbers are displayed (currency, percentages, decimal places, whatever you need).

Custom rendering

If none of the built-in chart types fit exactly what you need, CartesianChart is the same engine all of them are built on, and it's exported directly:

import { CartesianChart } from '@core-ease/chartkit';

<CartesianChart
  data={data}
  xKey="month"
  series={series}
  width={600}
  height={320}
  renderSeries={({ data, xScale, yScale, series }) => (
    // return any SVG here — you get fully computed scales and pixel coordinates
  )}
/>

This is how LineChart, AreaChart, BarChart, CandlestickChart, and ScatterChart are all implemented internally — there's no separate "advanced" API, it's the same one.

Styling

Colors default to a 10-color categorical palette if you don't set one per series. Everything renders as plain SVG/HTML with inline styles, so there's no CSS file to import and no class-name collisions to worry about — override colors, stroke widths, and radii through props.

TypeScript

Written entirely in TypeScript, ships its own declaration files, and every chart's props (LineChartProps, CandlestickChartProps, etc.) are exported individually so you can wrap or extend them in your own components.

Package layout

src/
  core/         scales, tick generation, SVG path builders, color palette,
                the ResizeObserver-based sizing hook
  components/   shared pieces: ChartContainer, grid, axes, tooltip, legend
  charts/       CartesianChart (the shared engine) plus every chart type
  types.ts      shared type definitions

License

MIT