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

dpchart

v2.0.2

Published

Create your graph based of eCharts

Readme

🚀 dpChart

Version License TypeScript React eCharts esbuild npm Bundle Size


📋 Table of Contents


🔥 About

dpChart is a lightweight, powerful charting library built on top of Apache ECharts. It provides a simplified API for creating beautiful, interactive charts with minimal code.

Created by Dario Passariello with ❤️


✨ Features

  • 🚀 Lightweight - ~50KB minified bundle
  • Fast - Built with esbuild for lightning-fast builds
  • 🎨 Beautiful - Stunning default styles and animations
  • 📱 Responsive - Charts automatically resize
  • 🔄 Reactive - Real-time data updates
  • 🎯 TypeScript - Full type support
  • 🔧 Flexible - Full ECharts power when you need it

⚡ Quick Start

import "dpchart";

dpchart.draw({
  id: "my-chart",
  appendTo: "#chart-container",
  option: {
    xAxis: { data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] },
    yAxis: {},
    series: [{ data: [10, 22, 28, 43, 49], type: 'line' }]
  }
});

📦 Installation

npm install dpchart --save

Or for the latest version:

npm install dpchart@latest --save

💻 Usage

JavaScript/TypeScript (React, Vue, etc.)

import "dpchart";

// Create a simple line chart
dpchart.draw({
  id: "chart_001",
  appendTo: "#chart-container",
  option: {
    tooltip: { trigger: 'axis' },
    xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] },
    yAxis: { type: 'value' },
    series: [{
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      smooth: true
    }]
  }
});

HTML (No build required)

<script src="https://unpkg.com/dpchart@latest/index.js"></script>

<div id="chart-container" style="width: 100%; height: 400px;"></div>

<script>
  dpchart.draw({
    id: "my-chart",
    appendTo: "#chart-container",
    option: {
      series: [{ data: [10, 20, 30], type: 'bar' }]
    }
  });
</script>

📊 Examples

Line Chart

dpchart.draw({
  id: "chart_001",
  appendTo: "#chart_001",
  option: {
    tooltip: { trigger: 'axis' },
    xAxis: { data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] },
    yAxis: {},
    series: [
      { name: 'Sales', type: 'bar', data: [820, 932, 901, 934, 1290, 1330, 1320] }
    ]
  }
});

Line Chart

Polar Chart

dpchart.draw({
  id: "chart_100",
  appendTo: "#chart_100",
  option: {
    angleAxis: {},
    radiusAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu'], z: 10 },
    polar: {},
    series: [
      { type: 'bar', data: [1, 2, 3, 4], coordinateSystem: 'polar', name: 'A', stack: 'a' },
      { type: 'bar', data: [2, 4, 6, 8], coordinateSystem: 'polar', name: 'B', stack: 'a' }
    ],
    legend: { show: true, data: ['A', 'B'] }
  }
});

Polar Chart


🛠️ API

dpchart.draw(options)

Creates and renders a chart.

| Parameter | Type | Description | |-----------|------|-------------| | id | string | Unique identifier for the chart | | appendTo | string | CSS selector or DOM element to append to | | option | object | ECharts configuration object | | style | object | Optional CSS styles (width, height) | | api | string | Optional API endpoint for dynamic data |


🔌 Utilities

dpchart.update({ id, data })

Update chart data:

dpchart.update({
  id: "my-chart",
  data: { series: [{ data: [50, 60, 70] }] }
});

dpchart.fakeData(count, max, steps)

Generate random time series data:

const [dates, values] = dpchart.fakeData('2024-01-01', 100, 30);
// Returns: [['2024/1/1', '2024/1/2', ...], [random values]]

dpchart.cvs.processData(csvString)

Parse CSV data:

const data = dpchart.cvs.processData("name,value,date\nA,10,2024-01-01\nB,20,2024-01-02");

📄 License

MIT License - Copyright (c) Dario Passariello


Made with ❤️ and a lot of caffe' espesso!