# @mikeyeah29/chord-diagram

> Draw an SVG guitar chord diagram in javascript.

Latest version **1.0.0** (published 2020-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mikeyeah29/chord-diagram
pnpm add @mikeyeah29/chord-diagram
yarn add @mikeyeah29/chord-diagram
bun add @mikeyeah29/chord-diagram
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-11-18 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mikeyeah29 |

## Links

- npm: https://www.npmjs.com/package/@mikeyeah29/chord-diagram
- npm.io page: https://npm.io/package/@mikeyeah29/chord-diagram

## Recent versions

- 1.0.0 (latest) — 2020-11-18

## README

# SVG Chord Diagram

Draw an SVG guitar chord diagram in javascript.

## Installation

Include the file dist/chord-diagram.min.js in a script tag

```html
   <script src="dist/chord-diagram.min.js" />
```

## Usage

Create a new chord diagram and put the name of the chord and the fret positions of each string as an array in the constructor parameters

```js
   var am = new ChordDiagram('Am', [-1, 0, 2, 2, 1, 0]);   
``` 
Append the svg to an element in the DOM

```js
   var div = document.getElementById('chords');
   div.appendChild(am.getSvg())
```
 # Development
 
The source code is in the js folder, to work on the project these files can be edited directly then when ready to publish run the following command from the root directory

```terminal
   npm run build
```

This will run build.js which concatenates and minifies all the js files to dist/chord-diagram.min.js

---
_Source: https://npm.io/package/@mikeyeah29/chord-diagram · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
