Skip to content

Commit

Permalink
Version 2 re-factoring and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhus committed Aug 16, 2016
1 parent 5b2538f commit 20407c4
Show file tree
Hide file tree
Showing 33 changed files with 2,300 additions and 2,564 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# @AngularClass
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": 2,
"max-len": [1, 80, 4, {
"ignoreComments": true,
"ignoreUrls": true
}]
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.idea
.idea/
docs/
coverage/
node_modules/
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea/
*.log
coverage/
.eslintrc
.babelrc
.travis.yml
Empty file added .travis.yml
Empty file.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016 Mykhailo Stadnyk

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49 changes: 6 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,21 @@
# HTML Canvas Gauges
# HTML Canvas Gauges v2.0

[![Canvas Gauges](https://raw.githubusercontent.com/Mikhus/blob/master/gauges.png)](https://rawgit.com/Mikhus/canv-gauge/master/examples/all-in-one.html)

This is tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas.
No need to use any library.

## Why canvas gauge?

Because it is compatible with most modern browsers and with mobile devices.
For example, SVG, does not work on Android 2.x by default, but canvas do work.
BTW you can find your own reasons why to use canvas.
No dependencies. Suitable for IoT devices because of minimum code base.

## Install

Make it simple using bower:
Make it simple using npm or bower:

$ npm install canv-gauge
$ bower install canv-gauge

## Documentation

Please, read [wiki](https://github.com/Mikhus/canv-gauge/wiki) for more information.

## AngularJS Support

AngularJS is now supported via [angular-canvas-gauge](https://github.com/dec/angular-canvas-gauge) directive. Big thanks to David Esperalta for amazing implementation!

## Examples

* [Basic example](https://rawgit.com/Mikhus/canv-gauge/master/examples/example-resize.html)
* Compass-like: [JavaScript](https://rawgit.com/Mikhus/canv-gauge/master/examples/example.html), [HTML](https://rawgit.com/Mikhus/canv-gauge/master/examples/example-html.html)
* Alternate look: [No border](https://rawgit.com/Mikhus/canv-gauge/master/examples/noborder.html)
* [All-in-one](https://rawgit.com/Mikhus/canv-gauge/master/examples/all-in-one.html)
* [More](http://smart-ip.net/gauge1.html) and [more](http://smart-ip.net/gauge2.html) and [more](http://smart-ip.net/gauge-html.html)...
* [Real usage example](http://smart-ip.net/speed-test)
coming soon...

## License

This code is subject to MIT license.

Copyright (c) 2012 Mykhailo Stadnyk <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This code is subject to [MIT](https://raw.githubusercontent.com/Mikhus/canv-gauge/v2.0.0/LICENSE) license.
50 changes: 25 additions & 25 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "canv-gauge",
"version": "1.0.4",
"homepage": "https://github.com/Mikhus/canv-gauge",
"authors": [
"Mykhailo Stadnyk <[email protected]>"
],
"description": "This is tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No need to use any library.",
"main": "gauge.min.js",
"moduleType": [],
"keywords": [
"gauge",
"html5"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"examples",
"build.bat",
"build.sh",
"compiler.jar"
]
"name": "canv-gauge",
"version": "2.0.0",
"homepage": "https://github.com/Mikhus/canv-gauge",
"authors": [
"Mykhailo Stadnyk <[email protected]>"
],
"description": "Minimalistic HTML5 Canvas Gauges",
"main": "gauge.min.js",
"moduleType": [],
"keywords": [
"gauge",
"html5"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"examples",
"build.bat",
"build.sh",
"compiler.jar"
]
}
2 changes: 0 additions & 2 deletions build.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build.sh

This file was deleted.

Binary file removed compiler.jar
Binary file not shown.
Loading

0 comments on commit 20407c4

Please sign in to comment.