Skip to content

Commit

Permalink
[docs] Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jul 30, 2019
1 parent f71c4a2 commit b17651d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
75 changes: 74 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,79 @@
# JustGage

![Justgage](docs/img/logo.png)

[![Downloads](https://img.shields.io/npm/dm/justgage.svg)](https://www.npmjs.com/package/justgage)

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.png?v=103)](https://opensource.org/licenses/mit-license.php)

[![NPM](https://nodei.co/npm/justgage.png?downloads=true)](https://nodei.co/npm/justgage/)

JustGage is a handy JavaScript plugin for generating and animating nice & clean dashboard gauges. It is based on Raphaël library for vector drawing.

### Changelog
## Getting Started

Installing Justgage is as easy as...

```bash
bower install justgage-official
```

or maybe you wish to use NPM...

```bash
npm install justgage
```

or you can always download the CSS and JS files...

```html
<!-- Raphael must be included before justgage -->
<script type="text/javascript" src="path/to/raphael-2.1.4.min.js"></script>
<script type="text/javascript" src="path/to/justgage.js"></script>
```

or if even don't want to download the files use [cdnjs](https://cdnjs.com/libraries/justgage)

```html
<!-- Raphael must be included before justgage -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/justgage/1.2.9/justgage.min.js"></script>
```

## Basic usage

**Html**

```html
<div id="gauge"></div>
```

**JS**

```js

var gauge = new JustGage({
id: "gauge", // the id of the html element
value: 50,
min: 0,
max: 100,
decimals: 2,
gaugeWidthScale: 0.6
});

// update the value randomly
setInterval(() => {
gauge.refresh(Math.random() * 100);
}, 5000)

```

## Demo

Click [here](https://justgage.com/) to see a demo

## Changelog

###### September 26, 2016. - release 1.2.9
* **customSectors** receives structural update + additional "percents" feature (define ranges in %).
Expand Down
Binary file added docs/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b17651d

Please sign in to comment.