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

datalys2-reports

v0.5.0

Published

A configuration-driven framework for building interactive, self-contained HTML dashboards and reports from a JSON config

Readme

Datalys2 Reports

A configuration-driven React framework for generating dynamic dashboards and reports.

Overview

Datalys2 Reports allows you to create rich, interactive reports by simply defining a JSON configuration embedded in your HTML. It handles the layout, data visualization, and interactivity, so you don't need to write custom React code for every report.

Features

  • JSON Configuration: Define your report structure, pages, and data in a simple JSON format.
  • Multiple Visuals: Tables, checklists, calendars, KPIs, cards, and charts — line, area, stacked/clustered bars, pie, scatter, histogram, heatmap, box plot, and gauge.
  • Layout System: Flexible row/column/grid layouts, tab containers, and modals.
  • Data Handling: Datasets in four formats, inline or gzip-compressed, fetched from a URL (JSON/CSV, with optional auto-refresh), or derived from another dataset with filters and aggregations.
  • Interactivity: Sorting, search, grouping, column hiding, row detail modals, in-report navigation, and per-visual view state remembered across reloads.
  • Export & Print: CSV export for tables, PNG/SVG export for charts, and a print/PDF mode that expands the whole report onto paper.
  • Theming: Customizable via CSS variables, with automatic light and dark modes.

Usage

A report is a single HTML file: two asset tags, a <div id="root">, and a JSON config. React and D3 are bundled into the script — there is nothing else to install and no build step.

  1. Include the assets: the CSS and JavaScript from a CDN.
  2. Add the container: a <div id="root"></div> element.
  3. Define the data: a <script id="report-data" type="application/json"> tag containing your report configuration.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Report</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/dl2-style.css">
</head>
<body>
    <div id="root"></div>

    <script id="report-data" type="application/json">
    {
        "pages": [ ... ],
        "datasets": { ... }
    }
    </script>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/datalys2-reports.min.js"></script>
</body>
</html>

Pin the version as above so a published report keeps rendering the way you built it. Swap @0.5.0 for @latest to always track the newest release.

Installing from npm

To host the assets yourself (or vendor them into another build):

npm install datalys2-reports

The files are then at node_modules/datalys2-reports/dist/datalys2-reports.min.js and .../dist/dl2-style.css. Copy or serve them, and reference them the same way as the CDN example.

This package ships a self-contained UMD bundle intended for a <script> tag — it mounts itself into #root on load and reads the report-data script. It does not export a React component API, so there is nothing to import.

For detailed documentation on the configuration schema and available components, see the docs folder.


Development

This section is only if you are building the package yourself!

Prerequisites

  • Node.js
  • npm

Setup

# Install dependencies
npm install

Build

To build the production bundle:

npm run build

Watch Mode

To watch for changes during development:

npm run dev

License

ISC