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

@chartml/core

v2.3.0

Published

A declarative markup language for creating beautiful, interactive data visualizations

Readme

@chartml/core

A declarative markup language for creating beautiful, interactive data visualizations.

Features

  • Built-in Chart Types: Bar, line, and area charts
  • Built-in Aggregation: GROUP BY, SUM, AVG, COUNT, MIN, MAX using d3-array
  • Plugin System: Extend with custom chart types, data sources, and aggregation engines
  • Inline Data: Works with JSON arrays out of the box
  • HTTP Data: Fetch data from REST APIs
  • Zero Extra Dependencies: Only d3 and js-yaml (already included)
  • Lightweight: ~21 KB gzipped

Installation

npm install @chartml/core

Quick Start

import { ChartML } from '@chartml/core';

const spec = `
type: chart
version: 1
title: "Monthly Revenue"

data:
  - month: "Jan"
    revenue: 45000
  - month: "Feb"
    revenue: 52000
  - month: "Mar"
    revenue: 48000

visualize:
  type: bar
  columns: month
  rows: revenue
  axes:
    left:
      label: "Revenue ($)"
      format: "$,.0f"
`;

const chartml = new ChartML();
await chartml.render(spec, document.getElementById('chart'));

Built-in Features

Chart Types

Built-in:

  • Bar charts (vertical, horizontal, grouped, stacked)
  • Line charts (single and multi-series)
  • Area charts (single, stacked, normalized)

Available as Plugins:

  • @chartml/chart-pie - Pie and doughnut charts
  • @chartml/chart-scatter - Scatter plots and bubble charts

Aggregation

Built-in d3-array aggregation (no plugin needed):

data:
  - region: "North"
    revenue: 1200
  - region: "North"
    revenue: 1350
  - region: "South"
    revenue: 950

transform:
  aggregate:
    dimensions: [region]
    measures:
      - column: revenue
        aggregation: sum
        name: total_revenue
    sort:
      - field: total_revenue
        direction: desc

visualize:
  type: bar
  columns: region
  rows: total_revenue

Supported Aggregations:

  • sum - Sum values
  • avg - Average values
  • count - Count rows
  • min - Minimum value
  • max - Maximum value
  • first - First value in group
  • last - Last value in group

Performance:

  • <1ms for 100 rows
  • 2-5ms for 1,000 rows
  • 20-50ms for 10,000 rows

Data Sources

Built-in:

  • inline - Inline JSON arrays (default)
  • http - Fetch from REST APIs

Example:

data:
  - month: "Jan"
    revenue: 45000

Or fetch from URL:

type: source
name: sales_data
provider: http
url: "https://api.example.com/sales"

Plugin System

Chart Renderer Plugins

import { ChartML } from '@chartml/core';
import '@chartml/chart-pie';  // Auto-registers

const chartml = new ChartML();
// Pie charts now available

Custom Data Source Plugins

import { globalRegistry } from '@chartml/core';

globalRegistry.registerDataSource('postgresql', async (spec) => {
  // Your PostgreSQL implementation
  return rows;
});

Custom Transform Plugins

import { globalRegistry } from '@chartml/core';

globalRegistry.registerTransformMiddleware(async (data, spec) => {
  // Your custom transform logic
  return transformedData;
});

Documentation

  • Website: https://chartml.org
  • Specification: https://chartml.org/spec
  • Examples: https://chartml.org/examples
  • Quick Reference: https://chartml.org/quick-reference

License

MIT © 2025 Alytic Pty Ltd

Powered By

ChartML is maintained by the team at Kyomi and is the visualization engine that powers the platform.