forked from my-archives/nchart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
3,642 additions
and
122 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
var randomScalingFactor = function(){ | ||
return Math.round(Math.random()*100); | ||
}; | ||
|
||
var barChartData = { | ||
labels : [ | ||
"January", | ||
"February", | ||
"March", | ||
"April", | ||
"May", | ||
"June", | ||
"July" | ||
], | ||
datasets : [ | ||
{ | ||
fillColor : "rgba(220,220,220,0.5)", | ||
strokeColor : "rgba(220,220,220,0.8)", | ||
highlightFill: "rgba(220,220,220,0.75)", | ||
highlightStroke: "rgba(220,220,220,1)", | ||
data : [ | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor() | ||
] | ||
}, | ||
{ | ||
fillColor : "rgba(151,187,205,0.5)", | ||
strokeColor : "rgba(151,187,205,0.8)", | ||
highlightFill : "rgba(151,187,205,0.75)", | ||
highlightStroke : "rgba(151,187,205,1)", | ||
data : [ | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor(), | ||
randomScalingFactor() | ||
] | ||
} | ||
] | ||
}; | ||
|
||
module.exports = barChartData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = [ | ||
{ | ||
value: 300, | ||
color:"#F7464A", | ||
highlight: "#FF5A5E", | ||
label: "Red" | ||
}, | ||
{ | ||
value: 50, | ||
color: "#46BFBD", | ||
highlight: "#5AD3D1", | ||
label: "Green" | ||
}, | ||
{ | ||
value: 100, | ||
color: "#FDB45C", | ||
highlight: "#FFC870", | ||
label: "Yellow" | ||
}, | ||
{ | ||
value: 40, | ||
color: "#949FB1", | ||
highlight: "#A8B3C5", | ||
label: "Grey" | ||
}, | ||
{ | ||
value: 120, | ||
color: "#4D5360", | ||
highlight: "#616774", | ||
label: "Dark Grey" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var randomScalingFactor = function(){ return Math.round(Math.random()*100)}; | ||
var lineChartData = { | ||
labels : ["January","February","March","April","May","June","July"], | ||
datasets : [ | ||
{ | ||
label: "My First dataset", | ||
fillColor : "rgba(220,220,220,0.2)", | ||
strokeColor : "rgba(220,220,220,1)", | ||
pointColor : "rgba(220,220,220,1)", | ||
pointStrokeColor : "#fff", | ||
pointHighlightFill : "#fff", | ||
pointHighlightStroke : "rgba(220,220,220,1)", | ||
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] | ||
}, | ||
{ | ||
label: "My Second dataset", | ||
fillColor : "rgba(151,187,205,0.2)", | ||
strokeColor : "rgba(151,187,205,1)", | ||
pointColor : "rgba(151,187,205,1)", | ||
pointStrokeColor : "#fff", | ||
pointHighlightFill : "#fff", | ||
pointHighlightStroke : "rgba(151,187,205,1)", | ||
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] | ||
} | ||
] | ||
} | ||
|
||
module.exports = lineChartData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = [ | ||
{ | ||
value: 300, | ||
color:"#F7464A", | ||
highlight: "#FF5A5E", | ||
label: "Red" | ||
}, | ||
{ | ||
value: 50, | ||
color: "#46BFBD", | ||
highlight: "#5AD3D1", | ||
label: "Green" | ||
}, | ||
{ | ||
value: 100, | ||
color: "#FDB45C", | ||
highlight: "#FFC870", | ||
label: "Yellow" | ||
}, | ||
{ | ||
value: 40, | ||
color: "#949FB1", | ||
highlight: "#A8B3C5", | ||
label: "Grey" | ||
}, | ||
{ | ||
value: 120, | ||
color: "#4D5360", | ||
highlight: "#616774", | ||
label: "Dark Grey" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
module.exports = require('./lib/chart'); | ||
// hacked for io.js/node.js | ||
global.window || (global.window = global); | ||
|
||
module.exports = require('./Chart'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
{ | ||
"name": "nchart", | ||
"version": "0.1.6", | ||
"version": "1.0.0", | ||
"description": "nChart for node.js inspired by Chart.js.", | ||
"author": "FangDun Cai <[email protected]>", | ||
"license": "MIT", | ||
"readmeFilename": "Readme.md", | ||
"keywords": [ | ||
"chart", | ||
"nchart", | ||
"canvas", | ||
"graphics", | ||
"image" | ||
], | ||
"main": "./lib/chart.js", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/cfddream/nchart.git" | ||
}, | ||
"repository": "cfddream/nchart.git", | ||
"devDependencies": { | ||
"canvas": "1.1.3", | ||
"mocha": "~1.9.0", | ||
"should": "~3.1.3" | ||
"canvas": "1.1.6", | ||
"mocha": "1.9.0", | ||
"should": "3.1.3" | ||
} | ||
} |