Skip to content

Latest commit

 

History

History
178 lines (131 loc) · 7.12 KB

File metadata and controls

178 lines (131 loc) · 7.12 KB
repo url homepage starredAt createdAt updatedAt language license branch stars isPublic isTemplate isArchived isFork hasReadMe refreshedAt description tags
hatemhosny/racing-bars
2026-01-03T04:53:09Z
2020-06-13T13:33:33Z
2026-01-21T22:18:22Z
TypeScript
MIT
develop
114
true
false
false
false
true
2026-01-24T22:32:32.290Z
Bar chart race made easy 🎉
animation
charts
d3
hacktoberfest
visualization

Ceasefire_Now-techforpalestine.org

RacingBars

Bar chart race made easy 🎉

RacingBars is an open-source, light-weight (~45kb gzipped), easy-to-use, and feature-rich javascript library for bar chart race, based on D3.js.

RacingBars is available for JavaScript, TypeScript, React, Vue and Svelte.

racing-bars: npm version racing-bars: npm downloads racing-bars: jsdelivr downloads license - MIT racing-bars: GitHub repo

🎡 Try it now on the online playground.

📖 Documentations

Features

Getting Started

Usage options include:

Option 1: Using a bundler

Install from npm

npm install racing-bars

then you can import it:

import { race } from "racing-bars";

const options = {
  title: 'My Racing Bars',
  // ... other options
};

race("/data.json", "#race", options);

Open in LiveCodes

Option 2: Load from CDN

ESM

<div id="race" style="height: 80vh"></div>
<script type="module">
  import { race } from "https://cdn.jsdelivr.net/npm/racing-bars";

  const options = {
    title: 'My Racing Bars',
    // ... other options
  };

  race("/data.json", "#race", options);
</script>

Open in LiveCodes

UMD

<div id="race" style="height: 80vh"></div>
<script src="https://cdn.jsdelivr.net/npm/racing-bars/racing-bars.umd.js"></script>
<script>
  const options = {
    title: 'My Racing Bars',
    // ... other options
  };

  // the UMD version provides the global object `racingBars`
  racingBars.race("/data.json", "#race", options);
</script>

Open in LiveCodes

Please refer to documentation website for usage, data preparation, chart options, API and more.

Examples Gallery

See gallery for usage examples.

Playground

Go to the online playground to try out the library.

Contribution

Contributions are welcome and highly appreciated.

Before contributing, please read the code of conduct.

Please open an issue to discuss your ideas before creating a pull request.

License

MIT License © Hatem Hosny.

Sponsor 💚

Please consider sponsoring the project to support its maintenance and continued development.