Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bar-chart-race

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bar-chart-race

A TypeScript library for creating smooth animated bar chart races by utilizing the HTML5 Canvas API to render high-performance graphics.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

Bar Chart Race Library

preview

An open-source Bar Chart Race library built with TypeScript. This library allows you to create a smooth animated bar chart races effortlessly. It works by utilizing the HTML5 Canvas API to render the graphics, providing high performance.

Installation

Install the library using npm:

npm install bar-chart-race

Or using yarn:

yarn add bar-chart-race

Usage

Here's a basic example to get you started:

import BarChartRace from "bar-chart-race";

const data = [
  {
    label: "USA",
    datasets: [
      { date: "2020", value: 267 },
      { date: "2021", value: 426 },
      { date: "2024", value: 279 },
    ],
  },
  {
    label: "China",
    datasets: [
      { date: "2020", value: 1883 },
      { date: "2021", value: 1340 },
      { date: "2022", value: 1748 },
    ],
  },
];

const chart = new BarChartRace(data, {
  width: 800,
  height: 400,
  element: document.querySelector("#chart-container")!,
});
chart.init();

Documentation

TBA

Keywords

FAQs

Package last updated on 01 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc