Introducing 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 S…


This content originally appeared on DEV Community and was authored by Hatem Hosny

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.

๐ŸŽก 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
};

const data = 'https://racing-bars.hatemhosny.dev/data/population.json';

race(data, "#race", options);

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
  };

  const data = 'https://racing-bars.hatemhosny.dev/data/population.json';

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

UMD

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


  const data = 'https://racing-bars.hatemhosny.dev/data/population.json';

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

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.

License

MIT License ยฉ Hatem Hosny.

Let's Get Started ๐Ÿš€

Get started now!


This content originally appeared on DEV Community and was authored by Hatem Hosny


Print Share Comment Cite Upload Translate Updates
APA

Hatem Hosny | Sciencx (2024-08-19T14:02:01+00:00) Introducing RacingBars ๐Ÿ“Š. Retrieved from https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/

MLA
" » Introducing RacingBars ๐Ÿ“Š." Hatem Hosny | Sciencx - Monday August 19, 2024, https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/
HARVARD
Hatem Hosny | Sciencx Monday August 19, 2024 » Introducing RacingBars ๐Ÿ“Š., viewed ,<https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/>
VANCOUVER
Hatem Hosny | Sciencx - » Introducing RacingBars ๐Ÿ“Š. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/
CHICAGO
" » Introducing RacingBars ๐Ÿ“Š." Hatem Hosny | Sciencx - Accessed . https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/
IEEE
" » Introducing RacingBars ๐Ÿ“Š." Hatem Hosny | Sciencx [Online]. Available: https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/. [Accessed: ]
rf:citation
» Introducing RacingBars ๐Ÿ“Š | Hatem Hosny | Sciencx | https://www.scien.cx/2024/08/19/introducing-racingbars-%f0%9f%93%8a/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.