Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
pie-chart.sublime-workspace
pie-chart.sublime-project

<<<<<<< HEAD
=======
bower_components/
>>>>>>> 93396e3... Initial import
node_modules/
coverage/
coverage/
60 changes: 32 additions & 28 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
{
"globals": {
"document": false,
"jQuery": false,
"angular": false,
"d3": false,
"jasmine": false,
"spyOn": false,
"inject": false,
"it": false,
"iit": false,
"xit": false,
"console": false,
"describe": false,
"expect": false,
"beforeEach": false,
"waits": false,
"waitsFor": false,
"runs": false
},
"bitwise": true,
"browser": true,
"node": true,
"es5": true,
"esnext": true,
"eqeqeq": true,
"bitwise": false,
"curly": false,
"esnext": false,
"camelcase": true,
"eqeqeq": true,
"eqnull": true,
"indent": 2,
"immed": true,
"latedef": true,
"maxlen": 100,
"quotmark": "single",
"newcap": true,
"nonew": true,
"noarg": true,
"regexp": true,
"undef": true,
"strict": false,
"unused": false,
"strict": true,
"eqnull": true,
"trailing": true,
"smarttabs": true
}
"sub": true,
"globals": {
"document": false,
"angular": true,
"d3": false,
"jasmine": false,
"spyOn": false,
"inject": false,
"it": false,
"iit": false,
"xit": false,
"console": false,
"describe": false,
"expect": false,
"beforeEach": false,
"waits": false,
"waitsFor": false,
"runs": false
}
}
5 changes: 3 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function(grunt) {
files: ['lib/**/*.js', 'test/*.spec.js'],
tasks: ['jshint', 'concat', 'uglify', 'karma:continuous'],
options: {
livereload: true,
livereload: true
}
},

Expand Down Expand Up @@ -86,7 +86,8 @@ module.exports = function(grunt) {

jshint: {
options: {
jshintrc: '.jshintrc'
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
Expand Down
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) 2014 n3-charts

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.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A pie chart is called using this syntax :
The pie chart directives needs two attributes : `data` and `options`. If one is missing, nothing happens.

#### Data
Your data be an array. Depending whether you wan a pie/dout or a gauge, the array can contain at least two rows, or only one.
Your data must be an array. Depending whether you wan a pie/donut or a gauge, the array can contain at least two rows, or only one.

##### Standard
```js
Expand All @@ -40,6 +40,10 @@ $scope.gauge_data = [
];
```

+ `complementBrightness` : optional (disabled by default). Expects a number between 0 and 100. If set, it will take the color of the chart, increase the brightness by a given percentage and use the new color for the complement.
+ `colorComplement` : optional (default is "white"). Defines the color of the complement. Will be ignored if `complementBrightness` is set.


#### Options
Options must be an object. Depending whether you want a pie/donut or a gauge, additional settings can be required.

Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
],
"dependencies": {
"d3": "~3.1.7",
"angular": "~1.0.6"
"angular": "*"
},
"devDependencies": {
"angular-mocks": "~1.0.6"
"angular-mocks": "*"
}
}
18 changes: 0 additions & 18 deletions bower_components/angular-mocks/.bower.json

This file was deleted.

4 changes: 0 additions & 4 deletions bower_components/angular-mocks/README.md

This file was deleted.

Loading