dartboard

1.0.2 • Public • Published

Dartboard

A library to add a dartboard to a web app. The board is built with D3 and fires events when a bed is clicked.

demo

Usage

<script src="https://unpkg.com/dartboard/dist/dartboard.js"></script>
var dartboard = new Dartboard('#dartboard');
dartboard.render();

document.querySelector('#dartboard').addEventListener('throw', function(d) {
    console.log(d.detail);
});

Codepen example

Readme

Keywords

Package Sidebar

Install

npm i dartboard

Weekly Downloads

70

Version

1.0.2

License

MIT

Last publish

Collaborators

  • bmcallis