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
1 parent
437991e
commit 8b9b77b
Showing
4 changed files
with
77 additions
and
29 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var Chart = require('../chart'); | ||
|
||
var chart = new Chart({width: 120, height: 20, directon: 'y', xlabel: 'time (hrs)', | ||
ylabel: 'winners', xmax: 3}); | ||
|
||
var min = new Date().getTime(); | ||
var max = new Date(min+1000*60*60*3); // 3 hrs | ||
var data = []; | ||
for (var i = 0; i < 1000; i++) { | ||
var date = Math.floor(min + Math.random()*(max - min)); | ||
data.push(date); | ||
} | ||
|
||
chart.bucketize(data, min, max); | ||
chart.draw(); | ||
process.exit(); | ||
|