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

revenue-radar

v0.1.2

Published

A block chart with animations and passed json file values changeable from dropdown menu

Downloads

29

Readme

revenue-radar

2025 Avidity DE internship project

How to run project

Start a web server, for example:

$ python -m http.server

Or if you don't have Python installed you can download a standalone executable, for example ran: https://github.com/m3ng9i/ran/releases/

Configuration

The runChart function accepts a configuration object with the following properties:

  • dataset: An array of 5 values which can be both urlsto certain lson files or just json datapassed directly. Each dataset array index refers to the selected option index of the <select> tag. Chart will adapt automatically to the quantity of dataset elements in the selected path.
  • chartType: Can be 'bar', 'line', or 'pie'.
  • dropdownRef: A selector for the dropdown element used to select the dataset.
  • canvasRef: A selector for the canvas element used as a space to create the chart.
  • colors: An object containing color configurations for the chart. > :warning: Colors options can't be used for the 'pie' chartType!!!
  • backgroundColor1: Background color for the first dataset.
  • borderColor1: Border color for the first dataset.
  • backgroundColor2: Background color for the second dataset.
  • borderColor2: Border color for the second dataset.

Consuming Code Example

Use following script in your HTML file as an example of using the runChart function:

<script src="script.js"></script>
<script>
  function updateChart() {
    runChart( {
    chartType: "bar",
      colors: {
        backgroundColor1: '#FF0000',
        borderColor1: 'rgb(15, 03, 123)',
        backgroundColor2: '#00FF00',
        borderColor2: 'green',
      },
      canvasRef: '#myBarChart',
      dropdownRef: "#time-select",
      dataset:  [
          "../sample-data/last-month.json",
          {
              type: "bar",
              data: {
                  labels: ["Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6"],
                  datasetg: [
                      { data: [16000, 16200, 15800, 16400, 16600, 16800] }
                  ],
                  datasetw: [
                      { data: [15500, 15700, 15900, 16100, 16300, 16500] }
                  ]
              }
          },
          {
              type: "bar",
              data: {
                  labels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5", "Week 6"],
                  datasetg: [
                      { data: [15500, 15700, 15900, 16100, 16300, 16500] }
                  ],
                  datasetw: [
                      { data: [15000, 15200, 15400, 15600, 15800, 16000] }
                  ]
              }
          },
          {
              type: "bar",
              data: {
                  labels: ["Month 1", "Month 2", "Month 3", "Month 4", "Month 5", "Month 6"],
                  datasetg: [
                      { data: [15000, 1200, 15400, 15600, 15800, 16000] }
                  ],
                  datasetw: [
                      { data: [14500, 14700, 14900, 15100, 15300, 15500] }
                  ]
              }
          },
          {
              type: "bar",
              data: {
                  labels: ["Quarter 1", "Quarter 2", "Quarter 3", "Quarter 4"],
                  datasetg: [
                      { data: [14000, 14500, 15000, 15500] }
                  ],
                  datasetw: [
                      { data: [13500, 14000, 14500, 15000] }
                  ]
              }
          }
      ]
    });
    runChart( {
    chartType: "line",
      colors: {
        backgroundColor1: '#FF0000',
        borderColor1: 'rgb(15, 03, 123)',
        backgroundColor2: '#00FF00',
        borderColor2: 'green',
      },
      canvasRef: '#myLineChart',
      dropdownRef: "#time-select",
      dataset:  ["../sample-data/last-month.json", "../sample-data/last-30-days.json", "../sample-data/last-90-days.json", "../sample-data/last-6-months.json", "../sample-data/last-year.json"]
    });
    runChart( {
    chartType: "PIE",
      canvasRef: '#myPieChart',
      dropdownRef: "#time-select",
      dataset:  ["../sample-data/last-30-days-sales.json", "../sample-data/last-30-days-sales.json", "../sample-data/last-90-days-sales.json", "../sample-data/last-6-month-sales.json", "../sample-data/last-year-sales.json"]
    });
    runChart( {
    chartType: "Pie",
      canvasRef: '#myPieChart2',
      dropdownRef: "#time-select",
      dataset:  [
        {
            data: {
                period: "last_30_days",
                products: ["Laptop", "Smartphone", "Headphones", "Smartwatch", "Tablet"],
                sells: [35, 60, 85, 45, 30]
            }
        },
        {
            data: {
                period: "last_30_days",
                products: ["Laptop", "Smartphone", "Headphones", "Smartwatch", "Tablet"],
                sells: [35, 60, 85, 45, 30]
            }
        },
        {
            data:{
                period: "last_90_days",
                products: ["Laptop", "Smartphone", "Headphones", "Smartwatch", "Tablet"],
                sells: [120, 180, 240, 150, 110]
            }
        },
        {
            data: {
                period: "last_6_months",
                products: ["Laptop", "Smartphone", "Headphones", "Smartwatch", "Tablet"],
                sells: [300, 45, 600, 375, 280]
            }
        },
        {
            data:{
                period: "last_year",
                products: ["Laptop", "Smartphone", "Headphones", "Smartwatch", "Tablet"],
                sells: [6000, 900, 1200, 750, 560]
            }
        }
        ],
    });
  
};

  window.onload = function() {
    updateChart();
  };
</script>